Class: SyntaxTree::CSS::Parser::State
- Inherits:
-
Object
- Object
- SyntaxTree::CSS::Parser::State
- Defined in:
- lib/syntax_tree/css/parser.rb
Overview
This is used to communicate between the various tokenization algorithms. It transports a value along with the new index.
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, index) ⇒ State
constructor
A new instance of State.
Constructor Details
#initialize(value, index) ⇒ State
Returns a new instance of State.
17 18 19 20 |
# File 'lib/syntax_tree/css/parser.rb', line 17 def initialize(value, index) @value = value @index = index end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
15 16 17 |
# File 'lib/syntax_tree/css/parser.rb', line 15 def index @index end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
15 16 17 |
# File 'lib/syntax_tree/css/parser.rb', line 15 def value @value end |