Class: Philiprehberger::HtmlBuilder::DoctypeNode
- Inherits:
-
Object
- Object
- Philiprehberger::HtmlBuilder::DoctypeNode
- Defined in:
- lib/philiprehberger/html_builder/builder.rb
Overview
A node that renders the HTML5 doctype declaration
Constant Summary collapse
- DECLARATION =
'<!DOCTYPE html>'
Instance Method Summary collapse
-
#to_html(indent: nil, indent_size: 2) ⇒ String
The doctype declaration.
Instance Method Details
#to_html(indent: nil, indent_size: 2) ⇒ String
Returns the doctype declaration.
325 326 327 328 329 330 331 |
# File 'lib/philiprehberger/html_builder/builder.rb', line 325 def to_html(indent: nil, indent_size: 2) if indent "#{' ' * (indent * indent_size)}#{DECLARATION}" else DECLARATION end end |