Class: SyntaxTree::EmbExprBeg

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

Overview

EmbExprBeg represents the beginning token for using interpolation inside of a parent node that accepts string content (like a string or regular expression).

"Hello, #{person}!"

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#child_nodes, #deconstruct, #deconstruct_keys, #format, #pretty_print, #to_json

Constructor Details

#initialize(value:, location:) ⇒ EmbExprBeg

Returns a new instance of EmbExprBeg.



4868
4869
4870
4871
# File 'lib/syntax_tree/node.rb', line 4868

def initialize(value:, location:)
  @value = value
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



4866
4867
4868
# File 'lib/syntax_tree/node.rb', line 4866

def location
  @location
end

#valueObject (readonly)

String

the #{ used in the string



4863
4864
4865
# File 'lib/syntax_tree/node.rb', line 4863

def value
  @value
end