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



31
32
33
# File 'lib/roby/coordination/calculus.rb', line 31

def left
  @left
end

#opObject

Returns the value of attribute op

Returns:

  • (Object)

    the current value of op



31
32
33
# File 'lib/roby/coordination/calculus.rb', line 31

def op
  @op
end

#rightObject

Returns the value of attribute right

Returns:

  • (Object)

    the current value of right



31
32
33
# File 'lib/roby/coordination/calculus.rb', line 31

def right
  @right
end

Instance Method Details

#evaluate(variables) ⇒ Object



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

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