Class: Refract::SymbolNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/symbol_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept, #copy, #start_line, #type, type

Constructor Details

#initialize(prism_node: nil, unescaped:, quoted:) ⇒ SymbolNode

Returns a new instance of SymbolNode.



5
6
7
8
9
10
# File 'lib/refract/nodes/symbol_node.rb', line 5

def initialize(prism_node: nil, unescaped:, quoted:)
  @prism_node = prism_node => Prism::Node | nil
  @unescaped = unescaped
  @quoted = quoted
  freeze
end

Instance Attribute Details

#quotedObject

Returns the value of attribute quoted.



12
13
14
# File 'lib/refract/nodes/symbol_node.rb', line 12

def quoted
  @quoted
end

#unescapedObject

Returns the value of attribute unescaped.



12
13
14
# File 'lib/refract/nodes/symbol_node.rb', line 12

def unescaped
  @unescaped
end