Class: NumbersAndWords::Wrappers::Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/numbers_and_words/wrappers/integer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(number) ⇒ Integer

Returns a new instance of Integer.


8
9
10
# File 'lib/numbers_and_words/wrappers/integer.rb', line 8

def initialize(number)
  @number = number
end

Instance Attribute Details

#numberObject

Returns the value of attribute number


6
7
8
# File 'lib/numbers_and_words/wrappers/integer.rb', line 6

def number
  @number
end

Instance Method Details

#to_words(options = {}) ⇒ Object


12
13
14
# File 'lib/numbers_and_words/wrappers/integer.rb', line 12

def to_words(options = {})
  to_figures_array.to_words options
end