Class: SyntaxTree::CSS::OpenCurlyToken
- 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-curly
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:) ⇒ OpenCurlyToken
constructor
A new instance of OpenCurlyToken.
-
#value ⇒ Object
Here for convenience for comparing between block types.
Methods inherited from Node
Constructor Details
#initialize(location:) ⇒ OpenCurlyToken
Returns a new instance of OpenCurlyToken.
629 630 631 |
# File 'lib/syntax_tree/css/nodes.rb', line 629 def initialize(location:) @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
627 628 629 |
# File 'lib/syntax_tree/css/nodes.rb', line 627 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
633 634 635 |
# File 'lib/syntax_tree/css/nodes.rb', line 633 def accept(visitor) visitor.visit_open_curly_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
637 638 639 |
# File 'lib/syntax_tree/css/nodes.rb', line 637 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
643 644 645 |
# File 'lib/syntax_tree/css/nodes.rb', line 643 def deconstruct_keys(keys) { location: location } end |
#value ⇒ Object
Here for convenience for comparing between block types.
648 649 650 |
# File 'lib/syntax_tree/css/nodes.rb', line 648 def value "{" end |