class Fortune::C_repetition

Combination with repetition

Public Class Methods

new(h) click to toggle source
Calls superclass method
# File lib/fortune/c_repetition.rb, line 5
def initialize(h)
  super(h)
  self.value = Math.factorial(self.n + self.k - 1)/(Math.factorial(self.k)*Math.factorial(self.n - 1))
end