Thomas Hurst wrote:

>* David Corbin (dcorbin / imperitek.com) wrote:
>
>>What is the "ruby way" of implementing OS-specific implementations?
>>
>
>You mean in native Ruby?
>
Yes

>
>If you can, I'd move all the implimentation specifics into
>subclasses/modules, and either include (mixin) the relevent one at
>runtime (probably the most Rubyish), or create an instance and proxy
>requests to it as needed (the way you'd do it in PHP).
>
OK.  But what is the way you determine which OS you're running on?

>
>>Specifically, at this time, I've got a working implementation for
>>something, but I'd like to use a more optimized form on Linux when
>>I've got "/proc" avaiable
>>
>
>And, of course, an even more optimized version on BSD's using sysctl's,
>without all that braindead /proc cruft ;)
>