Class: Roby::Tools::Calculus::Binary

Inherits:
Struct
  • Object
show all
Includes:
Build
Defined in:
lib/roby/coordination/calculus.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Build

binary_op, unary_op

Instance Attribute Details

#leftObject

Returns the value of attribute left

Returns:

  • (Object)

    the current value of left



33
34
35
# File 'lib/roby/coordination/calculus.rb', line 33

def left
  @left
end

#opObject

Returns the value of attribute op

Returns:

  • (Object)

    the current value of op



33
34
35
# File 'lib/roby/coordination/calculus.rb', line 33

def op
  @op
end

#rightObject

Returns the value of attribute right

Returns:

  • (Object)

    the current value of right



33
34
35
# File 'lib/roby/coordination/calculus.rb', line 33

def right
  @right
end

Instance Method Details

#evaluate(variables) ⇒ Object



34
35
36
# File 'lib/roby/coordination/calculus.rb', line 34

def evaluate(variables)
    left.evaluate(variables).send(op, right.evaluate(variables))
end