Class: Explicit::Documentation::Output::Webpage

Inherits:
Object
  • Object
show all
Defined in:
lib/explicit/documentation/output/webpage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(builder) ⇒ Webpage

Returns a new instance of Webpage.



7
8
9
# File 'lib/explicit/documentation/output/webpage.rb', line 7

def initialize(builder)
  @builder = builder
end

Instance Attribute Details

#builderObject (readonly)

Returns the value of attribute builder.



5
6
7
# File 'lib/explicit/documentation/output/webpage.rb', line 5

def builder
  @builder
end

Instance Method Details

#call(env) ⇒ Object



11
12
13
14
15
# File 'lib/explicit/documentation/output/webpage.rb', line 11

def call(env)
  @html ||= render_documentation_page(host: env["HTTP_HOST"])

  [200, {}, [@html]]
end

#inspectObject



17
18
19
# File 'lib/explicit/documentation/output/webpage.rb', line 17

def inspect
  "#{self.class.name}#call"
end