Class: GithubStats::IssueIngester
- Inherits:
-
Object
- Object
- GithubStats::IssueIngester
- Defined in:
- lib/github_stats/issue_ingester.rb
Overview
Retrieves issues from Github and upserts them into the database.
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#search_string ⇒ Object
Returns the value of attribute search_string.
Instance Method Summary collapse
- #ingest ⇒ Object
-
#initialize(search_string, options) ⇒ IssueIngester
constructor
A new instance of IssueIngester.
Constructor Details
#initialize(search_string, options) ⇒ IssueIngester
Returns a new instance of IssueIngester.
7 8 9 10 |
# File 'lib/github_stats/issue_ingester.rb', line 7 def initialize(search_string, ) self.search_string = search_string self. = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/github_stats/issue_ingester.rb', line 5 def @options end |
#search_string ⇒ Object
Returns the value of attribute search_string.
5 6 7 |
# File 'lib/github_stats/issue_ingester.rb', line 5 def search_string @search_string end |
Instance Method Details
#ingest ⇒ Object
12 13 14 15 |
# File 'lib/github_stats/issue_ingester.rb', line 12 def ingest return unless [:ingest] github.search_issues(search_string).items.each(&method(:insert_or_update)) end |