Class: SyntaxTree::CSS::WhitespaceToken
- Defined in:
- lib/syntax_tree/css/nodes.rb
Overview
A parsed token that contains only whitespace. www.w3.org/TR/css-syntax-3/#typedef-whitespace-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:) ⇒ WhitespaceToken
constructor
A new instance of WhitespaceToken.
Methods inherited from Node
Constructor Details
#initialize(value:, location:) ⇒ WhitespaceToken
Returns a new instance of WhitespaceToken.
949 950 951 952 |
# File 'lib/syntax_tree/css/nodes.rb', line 949 def initialize(value:, location:) @value = value @location = Location.from(location) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
947 948 949 |
# File 'lib/syntax_tree/css/nodes.rb', line 947 def location @location end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
947 948 949 |
# File 'lib/syntax_tree/css/nodes.rb', line 947 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
954 955 956 |
# File 'lib/syntax_tree/css/nodes.rb', line 954 def accept(visitor) visitor.visit_whitespace_token(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
958 959 960 |
# File 'lib/syntax_tree/css/nodes.rb', line 958 def child_nodes [] end |
#deconstruct_keys(keys) ⇒ Object
964 965 966 |
# File 'lib/syntax_tree/css/nodes.rb', line 964 def deconstruct_keys(keys) { value: value, location: location } end |