Class: Code::Node::Operation::Operator

Inherits:
Code::Node
  • Object
show all
Defined in:
lib/code/node/operation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Code::Node

#evaluate

Constructor Details

#initialize(parsed) ⇒ Operator

Returns a new instance of Operator.



7
8
9
10
# File 'lib/code/node/operation.rb', line 7

def initialize(parsed)
  @operator = parsed.delete(:operator)
  @statement = Node::Statement.new(parsed.delete(:statement))
end

Instance Attribute Details

#operatorObject (readonly)

Returns the value of attribute operator.



5
6
7
# File 'lib/code/node/operation.rb', line 5

def operator
  @operator
end

#statementObject (readonly)

Returns the value of attribute statement.



5
6
7
# File 'lib/code/node/operation.rb', line 5

def statement
  @statement
end