Class: Factorial::Result

Inherits:
Array
  • Object
show all
Defined in:
lib/factorial/result.rb

Instance Method Summary collapse

Constructor Details

#initialize(*number_array) ⇒ Result

Returns a new instance of Result.



4
5
6
7
# File 'lib/factorial/result.rb', line 4

def initialize(*number_array)
  num_arr =  *number_array
  num_arr.each{|i| self << fact(i)}
end