Class: RSSable::Parsers::Items::Medium

Inherits:
Base
  • Object
show all
Defined in:
lib/rssable/parsers/items/medium.rb

Instance Method Summary collapse

Methods inherited from Base

#comments_count, #initialize, #link, #published_at, #tags, #title

Constructor Details

This class inherits a constructor from RSSable::Parsers::Items::Base

Instance Method Details

#authorString

Returns the article author

Returns:

  • (String)


9
10
11
12
# File 'lib/rssable/parsers/items/medium.rb', line 9

def author
  creator_node = node.elements.find { |c| c.name == "creator" }
  node_text(creator_node)
end

#descriptionString

Returns the article description

Returns:

  • (String)


17
18
19
# File 'lib/rssable/parsers/items/medium.rb', line 17

def description
  node_text(node.at_xpath("//content:encoded"))
end