Class: SyntaxTree::CSS::ColonToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token containing a colon. www.w3.org/TR/css-syntax-3/#typedef-colon-token
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:) ⇒ ColonToken
constructor
A new instance of ColonToken.
Methods inherited from Node
Constructor Details
#initialize(location:) ⇒ ColonToken
Returns a new instance of ColonToken.
285 286 287 |
# File 'lib/syntax_tree/css/nodes.rb', line 285 def initialize(location:) @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
283 284 285 |
# File 'lib/syntax_tree/css/nodes.rb', line 283 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
289 290 291 |
# File 'lib/syntax_tree/css/nodes.rb', line 289 def accept(visitor) visitor.visit_colon_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
293 294 295 |
# File 'lib/syntax_tree/css/nodes.rb', line 293 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
299 300 301 |
# File 'lib/syntax_tree/css/nodes.rb', line 299 def deconstruct_keys(keys) { location: location } end |