Class: Occams::Seeds::Exporter
- Inherits:
-
Object
- Object
- Occams::Seeds::Exporter
- Defined in:
- lib/occams/seeds.rb
Direct Known Subclasses
File::Exporter, Layout::Exporter, Page::Exporter, Snippet::Exporter
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#path ⇒ Object
Returns the value of attribute path.
-
#site ⇒ Object
Returns the value of attribute site.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
-
#export!(classes = nil) ⇒ Object
if passed nil will use default seed classes.
-
#initialize(from, to = from) ⇒ Exporter
constructor
A new instance of Exporter.
Constructor Details
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
70 71 72 |
# File 'lib/occams/seeds.rb', line 70 def from @from end |
#path ⇒ Object
Returns the value of attribute path.
70 71 72 |
# File 'lib/occams/seeds.rb', line 70 def path @path end |
#site ⇒ Object
Returns the value of attribute site.
70 71 72 |
# File 'lib/occams/seeds.rb', line 70 def site @site end |
#to ⇒ Object
Returns the value of attribute to.
70 71 72 |
# File 'lib/occams/seeds.rb', line 70 def to @to end |
Instance Method Details
#export!(classes = nil) ⇒ Object
if passed nil will use default seed classes
82 83 84 85 86 87 88 |
# File 'lib/occams/seeds.rb', line 82 def export!(classes = nil) classes ||= SEED_CLASSES classes.each do |klass| klass = "Occams::Seeds::#{klass}::Exporter" klass.constantize.new(from, to).export! end end |