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.



11716
11717
11718
11719
# File 'lib/syntax_tree.rb', line 11716

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



11714
11715
11716
# File 'lib/syntax_tree.rb', line 11714

def location
  @location
end

#valueObject (readonly)

String

the beginning of the symbol literal array



11711
11712
11713
# File 'lib/syntax_tree.rb', line 11711

def value
  @value
end