Class: Everypolitician::PullRequest::Report::Elections
- Inherits:
-
Base
- Object
- Base
- Everypolitician::PullRequest::Report::Elections
show all
- Defined in:
- lib/everypolitician/pull_request/report/elections.rb
Instance Attribute Summary
Attributes inherited from Base
#after, #before
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#added ⇒ Object
11
12
13
|
# File 'lib/everypolitician/pull_request/report/elections.rb', line 11
def added
elections(after.events - before.events)
end
|
#elections(events) ⇒ Object
5
6
7
8
9
|
# File 'lib/everypolitician/pull_request/report/elections.rb', line 5
def elections(events)
events.select do |event|
event if event.document[:classification] == 'general election'
end
end
|
#removed ⇒ Object
15
16
17
|
# File 'lib/everypolitician/pull_request/report/elections.rb', line 15
def removed
elections(before.events - after.events)
end
|