Class: Relevant::Github

Inherits:
Object
  • Object
show all
Includes:
Widget
Defined in:
lib/relevant/github.rb

Constant Summary collapse

Version =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#activitiesObject



30
31
32
# File 'lib/relevant/github.rb', line 30

def activities
  options[:limit] ? feed.entries.first(options[:limit].to_i) : feed.entries
end

#feedObject

Raises:

  • (ArgumentError)


34
35
36
37
# File 'lib/relevant/github.rb', line 34

def feed
  raise ArgumentError, "Github RSS feed is not set" unless options[:rss_feed].present? 
  @feed ||= Feedzirra::Feed.fetch_and_parse(options[:rss_feed])
end