mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
17 lines
233 B
Ruby
17 lines
233 B
Ruby
|
require 'yaml'
|
||
|
|
||
|
|
||
|
class YamlWrapper
|
||
|
|
||
|
def load(filepath)
|
||
|
return YAML.load(File.read(filepath))
|
||
|
end
|
||
|
|
||
|
def dump(filepath, structure)
|
||
|
File.open(filepath, 'w') do |output|
|
||
|
YAML.dump(structure, output)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
end
|