Class: PullRequestSummarizer::Report::Elections

Inherits:
Base
  • Object
show all
Defined in:
lib/pull_request_summarizer/report/elections.rb

Instance Attribute Summary

Attributes inherited from Base

#after, #before

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PullRequestSummarizer::Report::Base

Instance Method Details

#addedObject



10
11
12
# File 'lib/pull_request_summarizer/report/elections.rb', line 10

def added
  elections(after.events - before.events)
end

#elections(events) ⇒ Object



4
5
6
7
8
# File 'lib/pull_request_summarizer/report/elections.rb', line 4

def elections(events)
  events.select do |event|
    event if event.document[:classification] == 'general election'
  end
end

#removedObject



14
15
16
# File 'lib/pull_request_summarizer/report/elections.rb', line 14

def removed
  elections(before.events - after.events)
end