Module: OS
- Defined in:
- lib/subduino/os.rb
Class Method Summary collapse
- .bsd? ⇒ Boolean
- .is?(what) ⇒ Boolean (also: is)
- .linux? ⇒ Boolean
- .mac? ⇒ Boolean
- .posix? ⇒ Boolean
- .solaris? ⇒ Boolean
- .to_s ⇒ Object
- .windows? ⇒ Boolean
Class Method Details
.is?(what) ⇒ Boolean Also known as: is
8 9 10 |
# File 'lib/subduino/os.rb', line 8 def is?(what) what === RbConfig::CONFIG['host_os'] end |
.linux? ⇒ Boolean
20 21 22 |
# File 'lib/subduino/os.rb', line 20 def linux? OS.is? /linux|cygwin/ end |
.posix? ⇒ Boolean
40 41 42 |
# File 'lib/subduino/os.rb', line 40 def posix? linux? or mac? or bsd? or solaris? or Process.respond_to?(:fork) end |
.solaris? ⇒ Boolean
36 37 38 |
# File 'lib/subduino/os.rb', line 36 def solaris? OS.is? /solaris|sunos/ end |
.to_s ⇒ Object
13 14 15 |
# File 'lib/subduino/os.rb', line 13 def to_s RbConfig::CONFIG['host_os'] end |