Class: BetterHtml::Tokenizer::HtmlErb

Inherits:
BaseErb
  • Object
show all
Defined in:
lib/better_html/tokenizer/html_erb.rb

Constant Summary

Constants inherited from BaseErb

BaseErb::EXPR_TRIM_MATCHER, BaseErb::REGEXP_WITHOUT_TRIM, BaseErb::STMT_TRIM_MATCHER

Instance Attribute Summary collapse

Attributes inherited from BaseErb

#tokens

Instance Method Summary collapse

Constructor Details

#initialize(buffer) ⇒ HtmlErb

Returns a new instance of HtmlErb.



10
11
12
13
# File 'lib/better_html/tokenizer/html_erb.rb', line 10

def initialize(buffer)
  @parser = HtmlTokenizer::Parser.new
  super(buffer)
end

Instance Attribute Details

#parserObject (readonly)

Returns the value of attribute parser.



8
9
10
# File 'lib/better_html/tokenizer/html_erb.rb', line 8

def parser
  @parser
end

Instance Method Details

#current_positionObject



15
16
17
# File 'lib/better_html/tokenizer/html_erb.rb', line 15

def current_position
  @parser.document_length
end