Class: SyntaxTree::CSS::CloseSquareToken
- 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-close-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:) ⇒ CloseSquareToken
constructor
A new instance of CloseSquareToken.
-
#value ⇒ Object
Here for convenience for comparing between block types.
Methods inherited from Node
Constructor Details
#initialize(location:) ⇒ CloseSquareToken
Returns a new instance of CloseSquareToken.
256 257 258 |
# File 'lib/syntax_tree/css/nodes.rb', line 256 def initialize(location:) @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
254 255 256 |
# File 'lib/syntax_tree/css/nodes.rb', line 254 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
260 261 262 |
# File 'lib/syntax_tree/css/nodes.rb', line 260 def accept(visitor) visitor.visit_close_square_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
264 265 266 |
# File 'lib/syntax_tree/css/nodes.rb', line 264 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
270 271 272 |
# File 'lib/syntax_tree/css/nodes.rb', line 270 def deconstruct_keys(keys) { location: location } end |
#value ⇒ Object
Here for convenience for comparing between block types.
275 276 277 |
# File 'lib/syntax_tree/css/nodes.rb', line 275 def value "]" end |