G
Giles Bowkett
I want to release some code without encouraging an OS X monoculture:
http://www.tbray.org/ongoing/When/200x/2007/11/12/IMGP7123.png
...but I have some nifty but not *absolutely* essential functionality
which currently I only know how to do on OS X. Is there a dependable
"if platform?(apple)" I can use?
Actually, now that I put it that way, I'm going to write one. But does
anyone know the quickest, cleanest way?
class Kernel
def os_x?
# ???
end
end
The gems discussion recently had somebody who specified the wrong
string indicating Windows for their platform - I wasn't sure if that
was the poster's mistake or a weird overabundance of useful
platform-indicative strings in gems or Ruby, but I want to avoid that
same pitfall.
--
Giles Bowkett
Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com
http://www.tbray.org/ongoing/When/200x/2007/11/12/IMGP7123.png
...but I have some nifty but not *absolutely* essential functionality
which currently I only know how to do on OS X. Is there a dependable
"if platform?(apple)" I can use?
Actually, now that I put it that way, I'm going to write one. But does
anyone know the quickest, cleanest way?
class Kernel
def os_x?
# ???
end
end
The gems discussion recently had somebody who specified the wrong
string indicating Windows for their platform - I wasn't sure if that
was the poster's mistake or a weird overabundance of useful
platform-indicative strings in gems or Ruby, but I want to avoid that
same pitfall.
--
Giles Bowkett
Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com