Class: PullRequestSummarizer::Report::Wikidata
- Defined in:
- lib/pull_request_summarizer/report/wikidata.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from PullRequestSummarizer::Report::Base
Instance Method Details
#changed ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/pull_request_summarizer/report/wikidata.rb', line 4 def changed prev = Hash[before.persons.map { |p| [p.id, p.wikidata] }] post = Hash[after.persons.map { |p| [p.id, p.wikidata] }] in_both = prev.keys & post.keys in_both.select { |id| prev[id] != post[id] }.map do |id| { id: id, was: prev[id] || 'none', now: post[id] || 'none', } end end |