Module: Ed::Env
- Defined in:
- lib/ed/env.rb
Class Method Summary collapse
-
.fork_unavailable? ⇒ Boolean
Returns true if Kernel#fork is unavailable.
-
.jruby? ⇒ Boolean
Are we on JRuby?.
-
.macruby? ⇒ Boolean
Are we on MacRuby?.
-
.windows? ⇒ Boolean
Are we on Windows?.
Class Method Details
.fork_unavailable? ⇒ Boolean
Returns true if Kernel#fork is unavailable.
35 36 37 |
# File 'lib/ed/env.rb', line 35 def fork_unavailable? macruby? || jruby? || windows? end |
.jruby? ⇒ Boolean
Returns Are we on JRuby?.
19 20 21 |
# File 'lib/ed/env.rb', line 19 def jruby? RUBY_PLATFORM == 'java' end |
.macruby? ⇒ Boolean
Returns Are we on MacRuby?.
27 28 29 |
# File 'lib/ed/env.rb', line 27 def macruby? defined?(RUBY_ENGINE) && RUBY_ENGINE == 'macruby' end |
.windows? ⇒ Boolean
Returns Are we on Windows?.
9 10 11 12 13 |
# File 'lib/ed/env.rb', line 9 def windows? RUBY_PLATFORM['mswin32'] || RUBY_PLATFORM['mingw'] || RUBY_PLATFORM['cygwin'] end |