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

Constant Summary

Constants included from Logging

Logging::LOG_DIR, Logging::LOG_FILE_NAME

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Logging

included, #logger, #logger=

Constructor Details

#initialize(pact) ⇒ HtmlPactRenderer

Returns a new instance of HtmlPactRenderer.



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

def initialize pact
  @json_content = pact.json_content
  @pact = pact
end

Class Method Details

.call(pact) ⇒ Object



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

def self.call pact
  new(pact).call
end

Instance Method Details

#callObject



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

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