Class: AbstractSyntaxTreeKit::Node::OP_ASGN2

Inherits:
AbstractSyntaxTreeKit::Node show all
Defined in:
lib/astkit/node/op_asgn2.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractSyntaxTreeKit::Node

#body, #children, #condition, #els, #first_column, #first_lineno, #last_column, #last_lineno, #type

Instance Method Summary collapse

Constructor Details

#initialize(node:, receiver:, operator:, index:, value:) ⇒ OP_ASGN2

Returns a new instance of OP_ASGN2.



6
7
8
9
10
11
12
# File 'lib/astkit/node/op_asgn2.rb', line 6

def initialize(node:, receiver:, operator:, index:, value:)
  super(node)
  @receiver = receiver
  @operator = operator
  @index = index
  @value = value
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



4
5
6
# File 'lib/astkit/node/op_asgn2.rb', line 4

def index
  @index
end

#operatorObject (readonly)

Returns the value of attribute operator.



4
5
6
# File 'lib/astkit/node/op_asgn2.rb', line 4

def operator
  @operator
end

#receiverObject (readonly)

Returns the value of attribute receiver.



4
5
6
# File 'lib/astkit/node/op_asgn2.rb', line 4

def receiver
  @receiver
end

#valueObject (readonly)

Returns the value of attribute value.



4
5
6
# File 'lib/astkit/node/op_asgn2.rb', line 4

def value
  @value
end