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

Constructor Details

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

Returns a new instance of HtmlPactRenderer.



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

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

Class Method Details

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



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

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

Instance Method Details

#callObject



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

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