Class: Integer

Inherits:
Object show all
Includes:
ActiveSupport::CoreExtensions::Integer::EvenOdd, ActiveSupport::CoreExtensions::Integer::Inflections, ActiveSupport::CoreExtensions::Integer::Time, English::Numerals
Defined in:
lib/gems/english-0.3.1/lib/english/numerals.rb,
lib/gems/english-0.3.1/lib/english/roman.rb,
lib/mack-facets/english_extensions/numerals.rb,
lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer.rb

Overview

:nodoc:

Constant Summary

Constants included from English::Numerals

English::Numerals::Mega, English::Numerals::Ones, English::Numerals::Teen, English::Numerals::Tens

Instance Method Summary collapse

Methods included from ActiveSupport::CoreExtensions::Integer::Time

#months, #years

Methods included from ActiveSupport::CoreExtensions::Integer::Inflections

#ordinalize

Methods included from ActiveSupport::CoreExtensions::Integer::EvenOdd

#even?, #multiple_of?, #odd?

Methods included from English::Numerals

#name

Instance Method Details

#englishObject

10.english #=> ‘ten’



67
68
69
# File 'lib/gems/english-0.3.1/lib/english/numerals.rb', line 67

def english
  English::Numerals.name(self)
end

#romanObject



133
134
135
# File 'lib/gems/english-0.3.1/lib/english/roman.rb', line 133

def roman
  English::RomanNumerals.roman(self) || ''
end

#to_s_romanObject

Converts this integer to a roman numeral.



139
140
141
# File 'lib/gems/english-0.3.1/lib/english/roman.rb', line 139

def to_s_roman
  English::RomanNumerals.from_integer(self) || ''
end