Class: Ruku::YAMLStorage
Overview
Stores Roku box information on disk in YAML
Constant Summary
Constants inherited from Storage
Instance Attribute Summary
Attributes inherited from Storage
Instance Method Summary collapse
Methods inherited from Storage
Constructor Details
This class inherits a constructor from Ruku::Storage
Instance Method Details
#load ⇒ Object
69 70 71 72 73 74 75 |
# File 'lib/ruku/storage.rb', line 69 def load if File.exist? @storage_path YAML.load_file(@storage_path) else Remotes.new end end |
#store(manager) ⇒ Object
63 64 65 66 67 |
# File 'lib/ruku/storage.rb', line 63 def store(manager) File.open(@storage_path, 'w') do |out| YAML.dump(manager, out) end end |