Class: Necropsy::WhyNotRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/necropsy/why_not_renderer.rb

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ WhyNotRenderer

Returns a new instance of WhyNotRenderer.



5
6
7
# File 'lib/necropsy/why_not_renderer.rb', line 5

def initialize(payload)
  @payload = payload
end

Instance Method Details

#renderObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/necropsy/why_not_renderer.rb', line 9

def render
  lines = heading
  append_definitions(lines)
  append_policy(lines)
  append_call_sites(lines)
  append_blockers(lines)
  append_special_diagnostics(lines)
  append_rules(lines)
  append_suggestions(lines)
  lines.join("\n")
end