Module: Antrapol::ToolRack::RuntimeUtils
- Defined in:
- lib/toolrack/runtime_utils.rb
Class Method Summary collapse
- .on_jruby? ⇒ Boolean (also: on_java?)
- .on_linux? ⇒ Boolean
- .on_mac? ⇒ Boolean
- .on_ruby? ⇒ Boolean
- .on_windows? ⇒ Boolean
- .os_string ⇒ Object
Class Method Details
.on_jruby? ⇒ Boolean Also known as: on_java?
27 28 29 |
# File 'lib/toolrack/runtime_utils.rb', line 27 def RuntimeUtils.on_jruby? (RUBY_PLATFORM =~ /java/) != nil end |
.on_linux? ⇒ Boolean
15 16 17 |
# File 'lib/toolrack/runtime_utils.rb', line 15 def RuntimeUtils.on_linux? (RbConfig::CONFIG['host_os'] =~ /linux/) != nil end |
.on_mac? ⇒ Boolean
11 12 13 |
# File 'lib/toolrack/runtime_utils.rb', line 11 def RuntimeUtils.on_mac? (RbConfig::CONFIG['host_os'] =~ /darwin|mac/) != nil end |
.on_ruby? ⇒ Boolean
23 24 25 |
# File 'lib/toolrack/runtime_utils.rb', line 23 def RuntimeUtils.on_ruby? not on_jruby? end |
.on_windows? ⇒ Boolean
7 8 9 |
# File 'lib/toolrack/runtime_utils.rb', line 7 def RuntimeUtils.on_windows? (RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/) != nil end |
.os_string ⇒ Object
19 20 21 |
# File 'lib/toolrack/runtime_utils.rb', line 19 def RuntimeUtils.os_string RbConfig::CONFIG['host_os'] end |