Class: SyntaxTree::CSS::IdentToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token that contains an plaintext identifier. www.w3.org/TR/css-syntax-3/#typedef-ident-token
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(value:, location:) ⇒ IdentToken
constructor
A new instance of IdentToken.
Methods inherited from Node
Constructor Details
#initialize(value:, location:) ⇒ IdentToken
578 579 580 581 |
# File 'lib/syntax_tree/css/nodes.rb', line 578 def initialize(value:, location:) @value = value @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
576 577 578 |
# File 'lib/syntax_tree/css/nodes.rb', line 576 def location @location end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
576 577 578 |
# File 'lib/syntax_tree/css/nodes.rb', line 576 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
583 584 585 |
# File 'lib/syntax_tree/css/nodes.rb', line 583 def accept(visitor) visitor.visit_ident_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
587 588 589 |
# File 'lib/syntax_tree/css/nodes.rb', line 587 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
593 594 595 |
# File 'lib/syntax_tree/css/nodes.rb', line 593 def deconstruct_keys(keys) { value: value, location: location } end |