Class: ConfigX::YamlSource

Inherits:
Source
  • Object
show all
Defined in:
lib/config_x/yaml_source.rb

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ YamlSource

Returns a new instance of YamlSource.



7
8
9
# File 'lib/config_x/yaml_source.rb', line 7

def initialize(source)
  @source = source
end

Instance Method Details

#loadObject



11
12
13
# File 'lib/config_x/yaml_source.rb', line 11

def load
  YAML.load(source) || {}
end