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

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

Defined Under Namespace

Classes: NotAPactError

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pact) ⇒ HtmlPactRenderer

Returns a new instance of HtmlPactRenderer.



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

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

Class Method Details

.call(pact) ⇒ Object



14
15
16
# File 'lib/pact_broker/api/renderers/html_pact_renderer.rb', line 14

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

Instance Method Details

#callObject



23
24
25
26
27
28
29
30
# File 'lib/pact_broker/api/renderers/html_pact_renderer.rb', line 23

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