Class: Niconico::Mylist::Item
- Inherits:
-
Object
- Object
- Niconico::Mylist::Item
- Includes:
- Xpathable
- Defined in:
- lib/niconico/mylist/item.rb
Instance Method Summary collapse
- #description ⇒ Object
- #guid ⇒ Object
-
#initialize(data) ⇒ Item
constructor
A new instance of Item.
- #inspect ⇒ Object
- #link ⇒ Object
- #pub_date ⇒ Object
- #title ⇒ Object
Constructor Details
#initialize(data) ⇒ Item
Returns a new instance of Item.
12 13 14 |
# File 'lib/niconico/mylist/item.rb', line 12 def initialize(data) @data = data end |
Instance Method Details
#description ⇒ Object
32 33 34 |
# File 'lib/niconico/mylist/item.rb', line 32 def description @description ||= xpath_text('description') end |
#guid ⇒ Object
24 25 26 |
# File 'lib/niconico/mylist/item.rb', line 24 def guid @guid ||= xpath_text('guid') end |
#inspect ⇒ Object
36 37 38 |
# File 'lib/niconico/mylist/item.rb', line 36 def inspect "#<#{self.class.name} title: #{title}>" end |
#link ⇒ Object
20 21 22 |
# File 'lib/niconico/mylist/item.rb', line 20 def link @link ||= xpath_text('link') end |
#pub_date ⇒ Object
28 29 30 |
# File 'lib/niconico/mylist/item.rb', line 28 def pub_date @pub_date ||= Time.parse(xpath_text('pubDate')) end |
#title ⇒ Object
16 17 18 |
# File 'lib/niconico/mylist/item.rb', line 16 def title @title ||= xpath_text('title') end |