Class: SolidusFeeds::Feed
- Inherits:
-
Object
- Object
- SolidusFeeds::Feed
- Defined in:
- lib/solidus_feeds/feed.rb
Instance Attribute Summary collapse
-
#generator ⇒ Object
Returns the value of attribute generator.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
Instance Method Summary collapse
- #generate(output) ⇒ Object
-
#initialize {|_self| ... } ⇒ Feed
constructor
A new instance of Feed.
- #publish ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ Feed
Returns a new instance of Feed.
7 8 9 |
# File 'lib/solidus_feeds/feed.rb', line 7 def initialize yield(self) if block_given? end |
Instance Attribute Details
#generator ⇒ Object
Returns the value of attribute generator.
5 6 7 |
# File 'lib/solidus_feeds/feed.rb', line 5 def generator @generator end |
#publisher ⇒ Object
Returns the value of attribute publisher.
5 6 7 |
# File 'lib/solidus_feeds/feed.rb', line 5 def publisher @publisher end |
Instance Method Details
#generate(output) ⇒ Object
11 12 13 |
# File 'lib/solidus_feeds/feed.rb', line 11 def generate(output) generator.call(output) end |
#publish ⇒ Object
15 16 17 18 19 |
# File 'lib/solidus_feeds/feed.rb', line 15 def publish publisher.call do |output| generate(output) end end |