Class: ContentfulMiddleman::LocalData::Store
- Inherits:
-
Object
- Object
- ContentfulMiddleman::LocalData::Store
- Includes:
- Tools::Backup::InstanceMethods
- Defined in:
- lib/contentful_middleman/local_data/store.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(files, folder) ⇒ Store
constructor
A new instance of Store.
- #write ⇒ Object
Methods included from Tools::Backup::InstanceMethods
Constructor Details
#initialize(files, folder) ⇒ Store
Returns a new instance of Store.
16 17 18 19 |
# File 'lib/contentful_middleman/local_data/store.rb', line 16 def initialize(files, folder) @files = files @folder = folder end |
Class Method Details
.base_path ⇒ Object
11 12 13 |
# File 'lib/contentful_middleman/local_data/store.rb', line 11 def base_path @base_path end |
.base_path=(path) ⇒ Object
7 8 9 |
# File 'lib/contentful_middleman/local_data/store.rb', line 7 def base_path=(path) @base_path = path end |
Instance Method Details
#write ⇒ Object
21 22 23 24 25 |
# File 'lib/contentful_middleman/local_data/store.rb', line 21 def write do_with_backup backup_name, path_to_backup do @files.each(&:write) end end |