Class: Occson::Rails::EnvironmentLoader
- Inherits:
-
Object
- Object
- Occson::Rails::EnvironmentLoader
- Defined in:
- lib/occson/rails/environment_loader.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(root, environment) ⇒ EnvironmentLoader
constructor
A new instance of EnvironmentLoader.
Constructor Details
#initialize(root, environment) ⇒ EnvironmentLoader
Returns a new instance of EnvironmentLoader.
4 5 6 7 |
# File 'lib/occson/rails/environment_loader.rb', line 4 def initialize(root, environment) @root = root @environment = environment end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/occson/rails/environment_loader.rb', line 9 def call files.each do |file| next unless File.exist?(file) EnvironmentStorer.new(EnvironmentParser.new(File.read(file)).call).call end end |