Class: Garterbelt::Comment
- Defined in:
- lib/renderers/comment.rb
Instance Attribute Summary
Attributes inherited from Text
Attributes inherited from Renderer
Instance Method Summary collapse
-
#initialize(opts) ⇒ Comment
constructor
A new instance of Comment.
- #render ⇒ Object
- #template ⇒ Object
Methods inherited from Text
#escaped_content, #line_end, #raise_with_block_content
Methods inherited from Renderer
#indent, #level, #line_end, #output, #output=
Constructor Details
#initialize(opts) ⇒ Comment
Returns a new instance of Comment.
3 4 5 |
# File 'lib/renderers/comment.rb', line 3 def initialize(opts) super end |
Instance Method Details
#render ⇒ Object
11 12 13 14 |
# File 'lib/renderers/comment.rb', line 11 def render raise_with_block_content output << template end |
#template ⇒ Object
7 8 9 |
# File 'lib/renderers/comment.rb', line 7 def template style == :text ? "" : "#{indent}<!-- #{content} -->#{line_end}" end |