Class: Occson::Rails::EnvironmentLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/occson/rails/environment_loader.rb

Instance Method Summary collapse

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

#callObject



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