lib/danger/helpers/comments_helper.rb
# This might be a bit weird, but table_kind_from_title is a shared dependency for
# parsing and generating. And rubocop was adamant about file size so...
This might be a bit weird, but table_kind_from_title is a shared dependency for
parsing and generating. And rubocop was adamant about file size so
This might be a bit weird but table_kind_from_title is a shared dependency for parsing and generating . And rubocop was adamant about file size so
def apply_template(tables: [], markdowns: [], danger_id: "danger", template: "github", request_source: template)
        require "erb"
        md_template = File.join(Danger.gem_path, "lib/danger/comment_generators/#{template}.md.erb")
        @tables = tables
        @markdowns = markdowns.map(&:message)
        @danger_id = danger_id
        @emoji_mapper = EmojiMapper.new(request_source.sub("_inline",""))
        return ERB.new(File.read(md_template), 0, "-").result(binding)
      end
def apply_template ( tables : [ ] , markdowns : [ ] , danger_id : "danger" , template : "github" , request_source : template ) require "erb" md_template = File . join ( Danger . gem_path , "lib/danger/comment_generators/#{template}.md.erb" ) @tables = tables @markdowns = markdowns . map ( & :message ) @danger_id = danger_id @emoji_mapper = EmojiMapper . new ( request_source . sub ( "_inline" , "" ) ) return ERB . new ( File . read ( md_template ) , 0 , "-" ) . result ( binding ) end
This might be a bit weird, but table_kind_from_title is a shared dependency for
parsing and generating.
This might be a bit weird but table_kind_from_title is a shared dependency for parsing and generating .
# erb: http://www.rrn.dk/rubys-erb-templating-system # for the extra args: http://stackoverflow.com/questions/4632879/erb-template-removing-the-trailing-line
tables
<not_specific>
markdowns
<not_specific>
danger_id
<not_specific>
template
<not_specific>
request_source
<not_specific>