Module: BSON::Environment
Overview
Provides static helper methods around determining what environment is running without polluting the global namespace.
Instance Method Summary collapse
-
#jruby? ⇒ true, false
Determine if we are using JRuby or not.
-
#ruby_1_9? ⇒ true, false
Determine if we are using Ruby version 1.9.
Instance Method Details
#jruby? ⇒ true, false
Determine if we are using JRuby or not.
32 33 34 |
# File 'lib/bson/environment.rb', line 32 def jruby? @jruby ||= defined?(JRUBY_VERSION) end |
#ruby_1_9? ⇒ true, false
Determine if we are using Ruby version 1.9.
44 45 46 |
# File 'lib/bson/environment.rb', line 44 def ruby_1_9? @ruby_1_9 ||= RUBY_VERSION < '2.0.0' end |