Class: SimpleMath::Calculator

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_math/calculator.rb

Overview

Calculator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#startObject

Returns the value of attribute start.



6
7
8
# File 'lib/simple_math/calculator.rb', line 6

def start
  @start
end

Class Method Details

.run(start: 0, &block) ⇒ Object



8
9
10
# File 'lib/simple_math/calculator.rb', line 8

def self.run(start: 0, &block)
  new(start: start).send(:calculate, &block)
end