Class: Fixnum

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

Overview

Extends Fixnum class with to_comma and to_name

Instance Method Summary collapse

Instance Method Details

#to_commaObject



15
16
17
# File 'lib/number_name_string.rb', line 15

def to_comma
  self.to_s.add_commas
end

#to_nameObject



19
20
21
# File 'lib/number_name_string.rb', line 19

def to_name
  NumberNameString[self]
end