Class: Propel::Rails::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/propel_rails.rb

Overview

Framework configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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

#environmentObject

Returns the value of attribute environment.



13
14
15
# File 'lib/propel_rails.rb', line 13

def environment
  @environment
end

#loggerObject

Returns the value of attribute logger.



13
14
15
# File 'lib/propel_rails.rb', line 13

def logger
  @logger
end

#root_pathObject

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

Returns:

  • (Boolean)


21
22
23
# File 'lib/propel_rails.rb', line 21

def development?
  @environment == "development"
end

#production?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/propel_rails.rb', line 25

def production?
  @environment == "production"
end

#test?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/propel_rails.rb', line 29

def test?
  @environment == "test"
end