Class: Brrr::Channel::Image

Inherits:
Feed::Element show all
Defined in:
lib/brrr/channel/image.rb

Instance Method Summary collapse

Methods inherited from Feed::Element

#value

Constructor Details

#initialize(node) ⇒ Image

Returns a new instance of Image.



5
6
7
# File 'lib/brrr/channel/image.rb', line 5

def initialize(node)
  super
end

Instance Method Details

#descriptionObject



29
30
31
# File 'lib/brrr/channel/image.rb', line 29

def description
  node.at_xpath("./description")&.content
end

#heightObject



25
26
27
# File 'lib/brrr/channel/image.rb', line 25

def height
  node.at_xpath("./height")&.content&.to_i
end


17
18
19
# File 'lib/brrr/channel/image.rb', line 17

def link
  node.at_xpath("./link").content
end

#titleObject



13
14
15
# File 'lib/brrr/channel/image.rb', line 13

def title
  node.at_xpath("./title").content
end

#urlObject



9
10
11
# File 'lib/brrr/channel/image.rb', line 9

def url
  node.at_xpath("./url").content
end

#widthObject



21
22
23
# File 'lib/brrr/channel/image.rb', line 21

def width
  node.at_xpath("./width")&.content&.to_i
end