Class: Norman::Adapters::YAML
- Inherits:
-
File
- Object
- Norman::Adapter
- File
- Norman::Adapters::YAML
- Defined in:
- lib/norman/adapters/yaml.rb
Overview
An Adapter that uses YAML for its storage.
Instance Attribute Summary
Attributes inherited from File
Attributes inherited from Norman::Adapter
Instance Method Summary collapse
Methods inherited from File
#initialize, #load_database, #save_database
Methods inherited from Norman::Adapter
#db_for, #initialize, #load_database, #save_database
Constructor Details
This class inherits a constructor from Norman::Adapters::File
Instance Method Details
#export_data ⇒ Object
12 13 14 |
# File 'lib/norman/adapters/yaml.rb', line 12 def export_data db.to_yaml end |
#import_data ⇒ Object
8 9 10 |
# File 'lib/norman/adapters/yaml.rb', line 8 def import_data data = ::YAML.load(::File.read(file_path)) end |