Non-recursive factorial in Ruby
The "of" in the name factorial_of is redundant and unconventional.

factorial_of 0 returns nil instead of the correct answer, which is 1.

def factorial(n)
  (1..n).inject(1, :*)
end