Class: Rack::Reqorder::Configuration
- Inherits:
-
Object
- Object
- Rack::Reqorder::Configuration
- Defined in:
- lib/rack/reqorder.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#mongoid_yml ⇒ Object
Returns the value of attribute mongoid_yml.
Instance Method Summary collapse
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
44 45 46 |
# File 'lib/rack/reqorder.rb', line 44 def environment @environment end |
#mongoid_yml ⇒ Object
Returns the value of attribute mongoid_yml.
44 45 46 |
# File 'lib/rack/reqorder.rb', line 44 def mongoid_yml @mongoid_yml end |
Instance Method Details
#validate! ⇒ Object
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rack/reqorder.rb', line 46 def validate! if mongoid_yml.blank? raise 'You need to setup mongoid.yml before using this gem' end if environment.blank? puts 'rack-reqorder: No environment found, assuming development environment' self.environment = :development end end |