Class Platform
In: lib/standard/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

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

Public Instance methods

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

enterprise?()

Alias for ree?

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

Return the name of the ruby interpreter.

iron_ruby?()

Alias for ironruby?

java?()

Alias for jruby?

official_ruby?()

Alias for mri?

parrot?()

Alias for cardinal?

perl?()

Alias for cardinal?

rbx?()

Alias for rubinius?

ruby?()

Alias for mri?

TODO: who knows what symbian returns?

[Validate]