Class: Pathtraq::Feed
- Inherits:
-
Array
- Object
- Array
- Pathtraq::Feed
- Defined in:
- lib/pathtraq.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Feed
constructor
A new instance of Feed.
Constructor Details
#initialize(data) ⇒ Feed
Returns a new instance of Feed.
30 31 32 33 34 35 36 37 |
# File 'lib/pathtraq.rb', line 30 def initialize(data) __setobj__([]) data.channel.items.each do |i| self << Item.new(i) end @title = data.title @link = data.link end |
Instance Attribute Details
#link ⇒ Object (readonly)
Returns the value of attribute link.
28 29 30 |
# File 'lib/pathtraq.rb', line 28 def link @link end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
27 28 29 |
# File 'lib/pathtraq.rb', line 27 def title @title end |
Class Method Details
.request(params = {}) ⇒ Object
22 23 24 25 |
# File 'lib/pathtraq.rb', line 22 def self.request(params = {}) params ||= {} new(SimpleRSS.new(Request.new(self::URL, params).send)) end |