Class: SyntaxTree::TLamBeg

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

Overview

TLamBeg represents the beginning of the body of a lambda literal using braces.

-> { value }

In the example above the TLamBeg represents the { operator.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ TLamBeg

Returns a new instance of TLamBeg.



11216
11217
11218
11219
# File 'lib/syntax_tree.rb', line 11216

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



11214
11215
11216
# File 'lib/syntax_tree.rb', line 11214

def location
  @location
end

#valueObject (readonly)

String

the beginning of the body of the lambda literal



11211
11212
11213
# File 'lib/syntax_tree.rb', line 11211

def value
  @value
end