Class: Omnom::Source::Github::Default

Inherits:
Atom
  • Object
show all
Defined in:
lib/omnom/source/github/default.rb

Instance Attribute Summary

Attributes inherited from Base

#config, #feed_key, #key, #options, #settings, #source_id

Instance Method Summary collapse

Methods inherited from Atom

#after_initialize, #author_name, #author_url, #get_raw_posts, #guid, #post_attributes, #published_at, #title, #url

Methods inherited from Base

#after_initialize, config, configure, cron, every, feed_url, full_key, guid_namespace, icon, icon_from_url, inherited, #initialize, key, required_config, required_options, #update, url

Methods included from ParserMethods

#html_to_text

Constructor Details

This class inherits a constructor from Omnom::Source::Base

Instance Method Details

#description ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/omnom/source/github/default.rb', line 15

def description
  content = @node.>('content').first
  return if content.blank?
  if content.text.include?('<div class="details">')
    content = content.parse_text
    return content.find('.details').inner_html
  end
  nil
end

#tags ⇒ Object



9
10
11
12
13
# File 'lib/omnom/source/github/default.rb', line 9

def tags
  if @node.>('content').first.text =~ /^<!-- ([a-z]+) -->/
    return [$1]
  end
end

#thumbnail_url ⇒ Object



25
26
27
# File 'lib/omnom/source/github/default.rb', line 25

def thumbnail_url
  nil
end