Class: SyntaxTree::CSS::OpenSquareToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token that represents the use of a [. www.w3.org/TR/css-syntax-3/#tokendef-open-square
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(location:) ⇒ OpenSquareToken
constructor
A new instance of OpenSquareToken.
-
#value ⇒ Object
Here for convenience for comparing between block types.
Methods inherited from Node
Constructor Details
#initialize(location:) ⇒ OpenSquareToken
Returns a new instance of OpenSquareToken.
687 688 689 |
# File 'lib/syntax_tree/css/nodes.rb', line 687 def initialize(location:) @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
685 686 687 |
# File 'lib/syntax_tree/css/nodes.rb', line 685 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
691 692 693 |
# File 'lib/syntax_tree/css/nodes.rb', line 691 def accept(visitor) visitor.visit_open_square_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
695 696 697 |
# File 'lib/syntax_tree/css/nodes.rb', line 695 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
701 702 703 |
# File 'lib/syntax_tree/css/nodes.rb', line 701 def deconstruct_keys(keys) { location: location } end |
#value ⇒ Object
Here for convenience for comparing between block types.
706 707 708 |
# File 'lib/syntax_tree/css/nodes.rb', line 706 def value "[" end |