Module: Believer::Environment::ClassMethods
- Defined in:
- lib/believer/environment.rb
Instance Method Summary collapse
Instance Method Details
#environment ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/believer/environment.rb', line 10 def environment if @environment.nil? if self.superclass.respond_to?(:environment) @environment = self.superclass.environment else env_class = ENVIRONMENTS.find { |env| env.respond_to?(:applies?) && env.applies? } @environment = env_class.new if env_class end end @environment end |
#environment=(env) ⇒ Object
22 23 24 |
# File 'lib/believer/environment.rb', line 22 def environment=(env) @environment = env end |