Class: Boxcars::Station::Configuration
- Inherits:
-
Object
- Object
- Boxcars::Station::Configuration
- Defined in:
- lib/boxcars/station.rb
Instance Attribute Summary collapse
-
#active_record_models ⇒ Object
Returns the value of attribute active_record_models.
-
#read_only ⇒ Object
Returns the value of attribute read_only.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 |
# File 'lib/boxcars/station.rb', line 9 def initialize @active_record_models = ENV.fetch("BOXCAR_ACTIVE_RECORD_MODELS", "").split(",").map(&:strip) @active_record_models = nil if @boxcar_active_record_models.is_a?(Array) && @boxcar_active_record_models.empty? @read_only = ENV.fetch("BOXCAR_READ_ONLY", "true") == "true" end |
Instance Attribute Details
#active_record_models ⇒ Object
Returns the value of attribute active_record_models.
7 8 9 |
# File 'lib/boxcars/station.rb', line 7 def active_record_models @active_record_models end |
#read_only ⇒ Object
Returns the value of attribute read_only.
7 8 9 |
# File 'lib/boxcars/station.rb', line 7 def read_only @read_only end |