Class: SyntaxTree::EmbExprBeg

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree.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

Constructor Details

#initialize(value:, location:) ⇒ EmbExprBeg

Returns a new instance of EmbExprBeg.



5538
5539
5540
5541
# File 'lib/syntax_tree.rb', line 5538

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



5536
5537
5538
# File 'lib/syntax_tree.rb', line 5536

def location
  @location
end

#valueObject (readonly)

String

the #{ used in the string



5533
5534
5535
# File 'lib/syntax_tree.rb', line 5533

def value
  @value
end