Class: BetterHtml::Tokenizer::HtmlLodash
- Inherits:
-
Object
- Object
- BetterHtml::Tokenizer::HtmlLodash
- Defined in:
- lib/better_html/tokenizer/html_lodash.rb
Instance Attribute Summary collapse
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
-
#tokens ⇒ Object
readonly
Returns the value of attribute tokens.
Instance Method Summary collapse
-
#initialize(buffer) ⇒ HtmlLodash
constructor
A new instance of HtmlLodash.
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
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
11 12 13 |
# File 'lib/better_html/tokenizer/html_lodash.rb', line 11 def parser @parser end |
#tokens ⇒ Object (readonly)
Returns the value of attribute tokens.
10 11 12 |
# File 'lib/better_html/tokenizer/html_lodash.rb', line 10 def tokens @tokens end |