Class: AdditionProblems

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

Class Method Summary collapse

Class Method Details

.generate_problem(min, max) ⇒ Object



2
3
4
5
6
# File 'lib/arithmetic_problems.rb', line 2

def self.generate_problem(min, max)
  a = rand(min..max)
  b = rand(min..max)
  "#{a} + #{b} = "
end