Module: Roject::LoadSaveable::InstanceMethods
- Defined in:
- lib/loadsaveable.rb
Overview
Methods that are implemented at the instance level
Author: Anshul Kharbanda Created: 7 - 10 - 2016
Instance Method Summary collapse
-
#save(filename) ⇒ Object
Saves the object at the given filename, formatted according to the extension.
Instance Method Details
#save(filename) ⇒ Object
Saves the object at the given filename, formatted according to the extension
Parameter: filename - the name of the file to save to (opened in w+ mode). Extension determines format
81 82 83 |
# File 'lib/loadsaveable.rb', line 81 def save filename IO.write filename, Parsers.get(filename).format(hash) end |