Class: ConfigX::YamlSource
Instance Method Summary collapse
-
#initialize(source) ⇒ YamlSource
constructor
A new instance of YamlSource.
- #load ⇒ Object
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
#load ⇒ Object
11 12 13 |
# File 'lib/config_x/yaml_source.rb', line 11 def load YAML.load(source) || {} end |