module NoBrainer
Public Class Methods
eager_load!()
click to toggle source
Calls superclass method
# File lib/nobrainer.rb, line 52 def eager_load! # XXX This forces all the NoBrainer code to be loaded in memory. # Not to be confused with eager_load() that operates on documents. # We assume that NoBrainer is already configured at this point. super NoBrainer::QueryRunner.stack # load the code for the current stack end
jruby?()
click to toggle source
# File lib/nobrainer.rb, line 36 def jruby? RUBY_PLATFORM == 'java' end
rails4?()
click to toggle source
# File lib/nobrainer.rb, line 40 def rails4? Gem.loaded_specs['activesupport'].version >= Gem::Version.new('4.0.0') end
rails5?()
click to toggle source
# File lib/nobrainer.rb, line 44 def rails5? Gem.loaded_specs['activesupport'].version >= Gem::Version.new('5.0.0.beta') end
rails6?()
click to toggle source
# File lib/nobrainer.rb, line 48 def rails6? Gem.loaded_specs['activesupport'].version >= Gem::Version.new('6.0.0') end