class YamlWrapper
Public Instance Methods
Source
# File lib/ceedling/yaml_wrapper.rb, line 31 def dump(filepath, structure) File.open(filepath, 'w') do |output| YAML.dump(structure, output) end end
Source
# File lib/ceedling/yaml_wrapper.rb, line 14 def load(filepath) source = ERB.new(File.read(filepath)).result begin return YAML.load(source, aliases: true) rescue ArgumentError return YAML.load(source) end end
Source
# File lib/ceedling/yaml_wrapper.rb, line 23 def load_string(source) begin return YAML.load(source, aliases: true) rescue ArgumentError return YAML.load(source) end end