Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/numerals_jp/extension/integer.rb

Overview

Extensions of Integer class

Instance Method Summary collapse

Instance Method Details

#to_jpString

Converts positive integer which is less than 10^16 to Japanese numerals.

Examples:

106.to_jp # => "百六"

Returns:

  • (String)

    the converted string

Raises:

  • (ArgumentError)

    if the integer is not positive or less than 10^16



10
11
12
# File 'lib/numerals_jp/extension/integer.rb', line 10

def to_jp
  NumeralsJp::IntegerConverter.to_jp(self)
end