Class: SyntaxTree::CSS::CloseCurlyToken
- 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-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:) ⇒ CloseCurlyToken
constructor
A new instance of CloseCurlyToken.
-
#value ⇒ Object
Here for convenience for comparing between block types.
Methods inherited from Node
Constructor Details
#initialize(location:) ⇒ CloseCurlyToken
Returns a new instance of CloseCurlyToken.
198 199 200 |
# File 'lib/syntax_tree/css/nodes.rb', line 198 def initialize(location:) @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
196 197 198 |
# File 'lib/syntax_tree/css/nodes.rb', line 196 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
202 203 204 |
# File 'lib/syntax_tree/css/nodes.rb', line 202 def accept(visitor) visitor.visit_close_curly_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
206 207 208 |
# File 'lib/syntax_tree/css/nodes.rb', line 206 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
212 213 214 |
# File 'lib/syntax_tree/css/nodes.rb', line 212 def deconstruct_keys(keys) { location: location } end |
#value ⇒ Object
Here for convenience for comparing between block types.
217 218 219 |
# File 'lib/syntax_tree/css/nodes.rb', line 217 def value "}" end |