Class: SyntaxTree::SymbolsBeg

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

Overview

SymbolsBeg represents the start of a symbol array literal with interpolation.

I[one two three]

In the snippet above, SymbolsBeg represents the “%I[” token. Note that these kinds of arrays can start with a lot of different delimiter types (e.g., %I| or %I<).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ SymbolsBeg

Returns a new instance of SymbolsBeg.



11145
11146
11147
11148
# File 'lib/syntax_tree.rb', line 11145

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



11143
11144
11145
# File 'lib/syntax_tree.rb', line 11143

def location
  @location
end

#valueObject (readonly)

String

the beginning of the symbol literal array



11140
11141
11142
# File 'lib/syntax_tree.rb', line 11140

def value
  @value
end