Class: SyntaxTree::CSS::StringToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token that contains a quoted string. www.w3.org/TR/css-syntax-3/#typedef-string-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:) ⇒ StringToken
constructor
A new instance of StringToken.
Methods inherited from Node
Constructor Details
#initialize(value:, location:) ⇒ StringToken
820 821 822 823 |
# File 'lib/syntax_tree/css/nodes.rb', line 820 def initialize(value:, location:) @value = value @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
818 819 820 |
# File 'lib/syntax_tree/css/nodes.rb', line 818 def location @location end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
818 819 820 |
# File 'lib/syntax_tree/css/nodes.rb', line 818 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
825 826 827 |
# File 'lib/syntax_tree/css/nodes.rb', line 825 def accept(visitor) visitor.visit_string_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
829 830 831 |
# File 'lib/syntax_tree/css/nodes.rb', line 829 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
835 836 837 |
# File 'lib/syntax_tree/css/nodes.rb', line 835 def deconstruct_keys(keys) { value: value, location: location } end |