Module: SuperStack::Compatibility::LayerWrapper
- Defined in:
- lib/super_stack/compatibility/layer_wrapper.rb
Instance Method Summary collapse
Instance Method Details
#load_from_yaml(file_name) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/super_stack/compatibility/layer_wrapper.rb', line 7 def load_from_yaml(file_name) begin self.replace Hash[YAML::load(File.open(file_name)).map { |k, v| [k.to_s, v] }] rescue NoMethodError => e # Empty file... raise "Invalid file '#{file_name}'" unless e. =~ /false:FalseClass/ end @file_name = file_name end |