Class: SyntaxTree::WordsBeg

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

Overview

WordsBeg represents the beginning of a string literal array with interpolation.

%W[one two three]

In the snippet above, a WordsBeg would be created with the value of “%W[”. Note that these kinds of arrays can start with a lot of different delimiter types (e.g., %W| or %W<).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ WordsBeg

Returns a new instance of WordsBeg.



13383
13384
13385
13386
# File 'lib/syntax_tree.rb', line 13383

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



13381
13382
13383
# File 'lib/syntax_tree.rb', line 13381

def location
  @location
end

#valueObject (readonly)

String

the start of the word literal array



13378
13379
13380
# File 'lib/syntax_tree.rb', line 13378

def value
  @value
end