Class: Yarss::Feed
- Inherits:
-
Object
- Object
- Yarss::Feed
- Defined in:
- lib/yarss/feed.rb
Overview
Feed data holder.
Instance Attribute Summary collapse
-
#description ⇒ String
Description.
-
#items ⇒ Array<Item>
Feed items.
-
#link ⇒ String
URL to the related Web page.
-
#title ⇒ String
Title.
Instance Method Summary collapse
-
#==(other) ⇒ Bool
Treat this class as a value object.
-
#initialize(attributes = nil) ⇒ Feed
constructor
A new instance of Feed.
Constructor Details
#initialize(attributes = nil) ⇒ Feed
Returns a new instance of Feed.
27 28 29 30 31 32 |
# File 'lib/yarss/feed.rb', line 27 def initialize(attributes = nil) attributes.each do |attribute, value| setter = "#{attribute}=" send(setter, value) end if attributes end |
Instance Attribute Details
#description ⇒ String
Description.
19 20 21 |
# File 'lib/yarss/feed.rb', line 19 def description @description end |
#link ⇒ String
URL to the related Web page.
14 15 16 |
# File 'lib/yarss/feed.rb', line 14 def link @link end |
#title ⇒ String
Title.
9 10 11 |
# File 'lib/yarss/feed.rb', line 9 def title @title end |
Instance Method Details
#==(other) ⇒ Bool
Treat this class as a value object.
39 40 41 42 43 44 45 46 |
# File 'lib/yarss/feed.rb', line 39 def ==(other) return false unless other.is_a?(self.class) title == other.title && link == other.link && description == other.description && items == other.items end |