Class: Occams::Seeds::Layout::Importer
- Defined in:
- lib/occams/seeds/layout/importer.rb
Instance Attribute Summary
Attributes inherited from Importer
#from, #path, #seed_ids, #site, #to
Instance Method Summary collapse
- #import!(path = self.path, parent = nil) ⇒ Object
-
#initialize(from, to = from) ⇒ Importer
constructor
A new instance of Importer.
Constructor Details
Instance Method Details
#import!(path = self.path, parent = nil) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/occams/seeds/layout/importer.rb', line 10 def import!(path = self.path, parent = nil) Dir["#{path}*/"].each do |layout_path| import_layout(layout_path, parent) end # cleaning up site.layouts.where('id NOT IN (?)', seed_ids).destroy_all end |