Class: Propel::Rails::Configuration
- Inherits:
-
Object
- Object
- Propel::Rails::Configuration
- Defined in:
- lib/propel_rails.rb
Overview
Framework configuration
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#root_path ⇒ Object
Returns the value of attribute root_path.
Instance Method Summary collapse
- #development? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #production? ⇒ Boolean
- #test? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 19 |
# File 'lib/propel_rails.rb', line 15 def initialize @environment = ENV.fetch("RAILS_ENV", "development") @logger = nil @root_path = nil end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
13 14 15 |
# File 'lib/propel_rails.rb', line 13 def environment @environment end |
#logger ⇒ Object
Returns the value of attribute logger.
13 14 15 |
# File 'lib/propel_rails.rb', line 13 def logger @logger end |
#root_path ⇒ Object
Returns the value of attribute root_path.
13 14 15 |
# File 'lib/propel_rails.rb', line 13 def root_path @root_path end |
Instance Method Details
#development? ⇒ Boolean
21 22 23 |
# File 'lib/propel_rails.rb', line 21 def development? @environment == "development" end |
#production? ⇒ Boolean
25 26 27 |
# File 'lib/propel_rails.rb', line 25 def production? @environment == "production" end |
#test? ⇒ Boolean
29 30 31 |
# File 'lib/propel_rails.rb', line 29 def test? @environment == "test" end |