Class: Niconico::Mylist::Item

Inherits:
Object
  • Object
show all
Includes:
Xpathable
Defined in:
lib/niconico/mylist/item.rb

Instance Method Summary collapse

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

#descriptionObject


32
33
34
# File 'lib/niconico/mylist/item.rb', line 32

def description
  @description ||= xpath_text('description')
end

#guidObject


24
25
26
# File 'lib/niconico/mylist/item.rb', line 24

def guid
  @guid ||= xpath_text('guid')
end

#inspectObject


36
37
38
# File 'lib/niconico/mylist/item.rb', line 36

def inspect
  "#<#{self.class.name} title: #{title}>"
end

20
21
22
# File 'lib/niconico/mylist/item.rb', line 20

def link
  @link ||= xpath_text('link')
end

#pub_dateObject


28
29
30
# File 'lib/niconico/mylist/item.rb', line 28

def pub_date
  @pub_date ||= Time.parse(xpath_text('pubDate'))
end

#titleObject


16
17
18
# File 'lib/niconico/mylist/item.rb', line 16

def title
  @title ||= xpath_text('title')
end