Class: PullRequestSummarizer::ReviewChanges

Inherits:
Object
  • Object
show all
Defined in:
lib/pull_request_summarizer/review_changes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(popolo_before_after) ⇒ ReviewChanges

Returns a new instance of ReviewChanges.



7
8
9
10
11
# File 'lib/pull_request_summarizer/review_changes.rb', line 7

def initialize(popolo_before_after)
  @popolo_files = popolo_before_after.map do |opts|
    ComparePopolo.parse(opts)
  end
end

Instance Attribute Details

#popolo_filesObject (readonly)

Returns the value of attribute popolo_files.



5
6
7
# File 'lib/pull_request_summarizer/review_changes.rb', line 5

def popolo_files
  @popolo_files
end

Instance Method Details

#templateObject



17
18
19
# File 'lib/pull_request_summarizer/review_changes.rb', line 17

def template
  @template ||= ERB.new(File.read(File.expand_path('../../../comment_template.md.erb', __FILE__)))
end

#to_htmlObject



13
14
15
# File 'lib/pull_request_summarizer/review_changes.rb', line 13

def to_html
  template.result(binding)
end