Class: SyntaxTree::CSS::URange

Inherits:
Node
  • Object
show all
Defined in:
lib/syntax_tree/css/nodes.rb

Overview

This node represents the use of the urange micro syntax, e.g. U+1F601. www.w3.org/TR/css-syntax-3/#typedef-urange

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#format, #pretty_print

Constructor Details

#initialize(start_value:, end_value:, location:) ⇒ URange

Returns a new instance of URange.



897
898
899
900
901
# File 'lib/syntax_tree/css/nodes.rb', line 897

def initialize(start_value:, end_value:, location:)
  @start_value = start_value
  @end_value = end_value
  @location = location
end

Instance Attribute Details

#end_valueObject (readonly)

Returns the value of attribute end_value.



895
896
897
# File 'lib/syntax_tree/css/nodes.rb', line 895

def end_value
  @end_value
end

#locationObject (readonly)

Returns the value of attribute location.



895
896
897
# File 'lib/syntax_tree/css/nodes.rb', line 895

def location
  @location
end

#start_valueObject (readonly)

Returns the value of attribute start_value.



895
896
897
# File 'lib/syntax_tree/css/nodes.rb', line 895

def start_value
  @start_value
end

Instance Method Details

#accept(visitor) ⇒ Object



903
904
905
# File 'lib/syntax_tree/css/nodes.rb', line 903

def accept(visitor)
  visitor.visit_urange(self)
end

#child_nodesObject Also known as: deconstruct



907
908
909
# File 'lib/syntax_tree/css/nodes.rb', line 907

def child_nodes
  []
end

#deconstruct_keys(keys) ⇒ Object



913
914
915
# File 'lib/syntax_tree/css/nodes.rb', line 913

def deconstruct_keys(keys)
  { start_value: start_value, end_value: end_value, location: location }
end