Class: AIPP::Environment::Fixtures

Inherits:
Cache
  • Object
show all
Defined in:
lib/aipp/environment.rb

Overview

Fixtures read from directory containing YAML files

Instance Method Summary collapse

Methods inherited from Cache

#[], #merge, #replace

Instance Method Details

#read!(dir) ⇒ Object



51
52
53
54
55
56
# File 'lib/aipp/environment.rb', line 51

def read!(dir)
  @table.clear
  dir.glob('*.yml').each do |file|
    @table[file.basename('.yml').to_s.to_sym] = YAML.load_file(file)
  end
end