Class | Platform
In: | lib/supplemental/facets/platform.rb
Parent: | Object

Platform class

Original version from RubyGems, Copyright (c) 2007 Eric Hodel

### Methods

== === =~ big_endian? bsd? byte_order byteorder cardinal? enterprise? host_os inspect interpreter iron_ruby? ironruby? java? jruby? linux? little_endian? local mac? match mri? new official_ruby? parrot? perl? posix? rbx? ree? rubinius? ruby? solaris? supported symbian? to_a to_s windows?

### Constants

RUBY | = | 'ruby' |  | A pure-ruby gem that may use Gem::Specification#extensions to build binary files.
CURRENT | = | 'current' |  | A platform-specific gem that is built for the packaging ruby‘s platform. This will be replaced with Gem::Platform::local.

### Attributes

cpu | [RW] |
os | [RW] |
version | [RW] |

### Public Class methods

local()
match(platform)
new(arch)
supported()

Array of supported platforms (ie. pure-Ruby and local platform).

### Public Instance methods

==(other)
===(other)
=~(other)
big_endian?()
bsd?()
byte_order()

Byte order of CPU. Determine byte order of underlying machine.

Examines the byte order of the underlying machine. Returns `:big` if Big Endian and `:little` if Little Endian.

TODO: This doesn‘t work well apearently. We need to use a chart for possible cpus instead, maybe.

byteorder()

Alias for byte_order

cardinal?()
enterprise?()

Alias for ree?

host_os()

O P E R A T I N G S Y S T E M

inspect()
interpreter()

Return the name of the ruby interpreter.

iron_ruby?()

Alias for ironruby?

ironruby?()
java?()

Alias for jruby?

jruby?()
linux?()
little_endian?()
mac?()
mri?()
official_ruby?()

Alias for mri?

parrot?()

Alias for cardinal?

perl?()

Alias for cardinal?

posix?()
rbx?()

Alias for rubinius?

ree?()
rubinius?()
ruby?()

Alias for mri?

solaris?()
symbian?()

TODO: who knows what symbian returns?

to_a()
to_s()
windows?()

[Validate]