class Demalculator::Calc
class used for calculations
Public Class Methods
add(addend, augend)
click to toggle source
# File lib/demalculator.rb, line 8 def self.add(addend, augend) addend + augend end
multiply(factor, multiplicator)
click to toggle source
# File lib/demalculator.rb, line 16 def self.multiply(factor, multiplicator) factor * multiplicator end
power(base, exp)
click to toggle source
# File lib/demalculator.rb, line 20 def self.power(base, exp) base**exp end
subtract(minuend, subtrahend)
click to toggle source
# File lib/demalculator.rb, line 12 def self.subtract(minuend, subtrahend) minuend - subtrahend end