Class: Boxcars::Station::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_modelsObject

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_onlyObject

Returns the value of attribute read_only.



7
8
9
# File 'lib/boxcars/station.rb', line 7

def read_only
  @read_only
end