Class: BetterHtml::Tokenizer::HtmlLodash

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(buffer) ⇒ HtmlLodash

Returns a new instance of HtmlLodash.



18
19
20
21
22
23
24
# File 'lib/better_html/tokenizer/html_lodash.rb', line 18

def initialize(buffer)
  @buffer = buffer
  @scanner = StringScanner.new(buffer.source)
  @parser = HtmlTokenizer::Parser.new
  @tokens = []
  scan!
end

Instance Attribute Details

#parserObject (readonly)

Returns the value of attribute parser.



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

def parser
  @parser
end

#tokensObject (readonly)

Returns the value of attribute tokens.



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

def tokens
  @tokens
end