Class: ASTLeaf

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

Overview

Abstract Syntax Tree Leaf

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ ASTLeaf

Returns a new instance of ASTLeaf.



86
87
88
# File 'lib/ast.rb', line 86

def initialize(data)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



84
85
86
# File 'lib/ast.rb', line 84

def data
  @data
end

Instance Method Details

#to_sObject



90
91
92
# File 'lib/ast.rb', line 90

def to_s
  @data
end