Class: Explicit::Documentation::Output::Webpage
- Inherits:
-
Object
- Object
- Explicit::Documentation::Output::Webpage
- Defined in:
- lib/explicit/documentation/output/webpage.rb
Instance Attribute Summary collapse
-
#builder ⇒ Object
readonly
Returns the value of attribute builder.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(builder) ⇒ Webpage
constructor
A new instance of Webpage.
- #inspect ⇒ Object
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
#builder ⇒ Object (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 |
#inspect ⇒ Object
17 18 19 |
# File 'lib/explicit/documentation/output/webpage.rb', line 17 def inspect "#{self.class.name}#call" end |