Class: Smartkiosk::Config::YAML
- Defined in:
- lib/smartkiosk/config/yaml.rb
Instance Method Summary collapse
-
#initialize(file) ⇒ YAML
constructor
A new instance of YAML.
- #save! ⇒ Object
Constructor Details
#initialize(file) ⇒ YAML
Returns a new instance of YAML.
8 9 10 |
# File 'lib/smartkiosk/config/yaml.rb', line 8 def initialize(file) super load_yml(@file = file) end |
Instance Method Details
#save! ⇒ Object
12 13 14 15 16 |
# File 'lib/smartkiosk/config/yaml.rb', line 12 def save! File.open(@file, 'wb') do |file| file.write(self.marshal_dump.to_yaml) end end |