Class: PactBroker::Api::Renderers::HtmlPactRenderer

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/pact_broker/api/renderers/html_pact_renderer.rb

Defined Under Namespace

Classes: NotAPactError

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Logging

included, #log_error, #log_with_tag, #measure_info

Constructor Details

#initialize(pact, options = {}) ⇒ HtmlPactRenderer

Returns a new instance of HtmlPactRenderer.



22
23
24
25
26
# File 'lib/pact_broker/api/renderers/html_pact_renderer.rb', line 22

def initialize pact, options = {}
  @json_content = pact.json_content
  @pact = pact
  @options = options
end

Class Method Details

.call(pact, options = {}) ⇒ Object



18
19
20
# File 'lib/pact_broker/api/renderers/html_pact_renderer.rb', line 18

def self.call pact, options = {}
  new(pact, options).call
end

Instance Method Details

#callObject



28
29
30
31
32
33
34
35
# File 'lib/pact_broker/api/renderers/html_pact_renderer.rb', line 28

def call
  "<html>
    <head>#{head}</head>
    <body>
      #{breadcrumbs}#{}#{html}
    </body>
  </html>"
end