Class: SyntaxTree::CSS::FunctionToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token that contains the beginning of a call to a function, e.g., “url(”. www.w3.org/TR/css-syntax-3/#typedef-function-token
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(value:, location:) ⇒ FunctionToken
constructor
A new instance of FunctionToken.
Methods inherited from Node
Constructor Details
#initialize(value:, location:) ⇒ FunctionToken
Returns a new instance of FunctionToken.
527 528 529 530 |
# File 'lib/syntax_tree/css/nodes.rb', line 527 def initialize(value:, location:) @value = value @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
525 526 527 |
# File 'lib/syntax_tree/css/nodes.rb', line 525 def location @location end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
525 526 527 |
# File 'lib/syntax_tree/css/nodes.rb', line 525 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
532 533 534 |
# File 'lib/syntax_tree/css/nodes.rb', line 532 def accept(visitor) visitor.visit_function_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
536 537 538 |
# File 'lib/syntax_tree/css/nodes.rb', line 536 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
542 543 544 |
# File 'lib/syntax_tree/css/nodes.rb', line 542 def deconstruct_keys(keys) { value: value, location: location } end |