Class: Faust2Ruby::AST::Access

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

Overview

Access with brackets: expr

Instance Attribute Summary collapse

Attributes inherited from Node

#column, #line

Instance Method Summary collapse

Constructor Details

#initialize(operand, index, **opts) ⇒ Access

Returns a new instance of Access.



264
265
266
267
268
# File 'lib/faust2ruby/ast.rb', line 264

def initialize(operand, index, **opts)
  super(**opts)
  @operand = operand
  @index = index
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



262
263
264
# File 'lib/faust2ruby/ast.rb', line 262

def index
  @index
end

#operandObject (readonly)

Returns the value of attribute operand.



262
263
264
# File 'lib/faust2ruby/ast.rb', line 262

def operand
  @operand
end