Class: Brrr::Channel::Image
- Inherits:
-
Feed::Element
- Object
- Feed::Element
- Brrr::Channel::Image
- Defined in:
- lib/brrr/channel/image.rb
Instance Method Summary collapse
- #description ⇒ Object
- #height ⇒ Object
-
#initialize(node) ⇒ Image
constructor
A new instance of Image.
- #link ⇒ Object
- #title ⇒ Object
- #url ⇒ Object
- #width ⇒ Object
Methods inherited from Feed::Element
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
#description ⇒ Object
29 30 31 |
# File 'lib/brrr/channel/image.rb', line 29 def description node.at_xpath("./description")&.content end |
#height ⇒ Object
25 26 27 |
# File 'lib/brrr/channel/image.rb', line 25 def height node.at_xpath("./height")&.content&.to_i end |
#link ⇒ Object
17 18 19 |
# File 'lib/brrr/channel/image.rb', line 17 def link node.at_xpath("./link").content end |
#title ⇒ Object
13 14 15 |
# File 'lib/brrr/channel/image.rb', line 13 def title node.at_xpath("./title").content end |
#url ⇒ Object
9 10 11 |
# File 'lib/brrr/channel/image.rb', line 9 def url node.at_xpath("./url").content end |
#width ⇒ Object
21 22 23 |
# File 'lib/brrr/channel/image.rb', line 21 def width node.at_xpath("./width")&.content&.to_i end |