class Gf::DiffFile

Public Class Methods

new(path) click to toggle source
# File lib/gf.rb, line 40
def initialize(path)
  @path  = path
  @pulls = []
end

Public Instance Methods

<<(pull) click to toggle source
# File lib/gf.rb, line 45
def <<(pull)
  @pulls << pull
end
report() click to toggle source
# File lib/gf.rb, line 49
def report
  template.result_with_hash(path: @path, pulls: @pulls)
end

Private Instance Methods

template() click to toggle source
# File lib/gf.rb, line 55
    def template
      ERB.new(<<-'EOS', nil, '-')
<%= path %> (<%= pulls.count %>)
<% pulls.each do |pull| -%>
    - <%= "#{pull.branch_name} : #{pull.html_url}" %>
<% end -%>
      EOS
    end