Class: Sablon::Processor::Document::CommentHandler

Inherits:
FieldHandler
  • Object
show all
Defined in:
lib/sablon/processor/document/field_handlers.rb

Overview

Handles comment blocks in the template

Instance Method Summary collapse

Methods inherited from FieldHandler

#handles?

Constructor Details

#initializeCommentHandler

Returns a new instance of CommentHandler.



106
107
108
# File 'lib/sablon/processor/document/field_handlers.rb', line 106

def initialize
  super(/^comment$/)
end

Instance Method Details

#build_statement(constructor, _field, _options = {}) ⇒ Object



110
111
112
113
# File 'lib/sablon/processor/document/field_handlers.rb', line 110

def build_statement(constructor, _field, _options = {})
  block = constructor.consume_block('endComment')
  Statement::Comment.new(block)
end