Class: CdmMigrator::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/cdm_migrator/engine.rb

Class Method Summary collapse

Class Method Details

.configObject



15
16
17
18
# File 'lib/cdm_migrator/engine.rb', line 15

def config
  file    = File.open(File.join(::Rails.root, "/config/cdm_migrator.yml"))
  @config ||= YAML.safe_load(file)
end

.load_config(file) ⇒ Object

loads a yml file with the configuration options

Parameters:

  • file (String)

    path to the yml file



24
25
26
# File 'lib/cdm_migrator/engine.rb', line 24

def load_config(file)
  @config = YAML.load_file(file)
end