Class: LockDiff::Formatter::GithubMarkdown

Inherits:
Object
  • Object
show all
Defined in:
lib/lock_diff/formatter/github_markdown.rb

Defined Under Namespace

Classes: DiffFormmater

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(diff_infos) ⇒ GithubMarkdown

Returns a new instance of GithubMarkdown.



8
9
10
# File 'lib/lock_diff/formatter/github_markdown.rb', line 8

def initialize(diff_infos)
  @diff_infos = diff_infos
end

Class Method Details

.format(diff_infos) ⇒ Object



4
5
6
# File 'lib/lock_diff/formatter/github_markdown.rb', line 4

def self.format(diff_infos)
  new(diff_infos).call
end

Instance Method Details

#callObject



12
13
14
15
16
17
# File 'lib/lock_diff/formatter/github_markdown.rb', line 12

def call
  _body = body
  if _body
    (headers + _body).join("\n")
  end
end