Class: NumbersAndWords::Strategies::En

Inherits:
Base
  • Object
show all
Includes:
TranslationsHelpers::En
Defined in:
lib/numbers_and_words/strategies/en.rb

Constant Summary

Constants included from TranslationsHelpers::Base

TranslationsHelpers::Base::I18N_NAMESPACE

Instance Attribute Summary collapse

Attributes inherited from Base

#figures, #words

Instance Method Summary collapse

Methods included from TranslationsHelpers::Base

#t

Methods inherited from Base

factory

Instance Attribute Details

#figures_in_previous_capacityObject

Returns the value of attribute figures_in_previous_capacity.



6
7
8
# File 'lib/numbers_and_words/strategies/en.rb', line 6

def figures_in_previous_capacity
  @figures_in_previous_capacity
end

Instance Method Details

#convert(figures) ⇒ Object



8
9
10
11
12
13
# File 'lib/numbers_and_words/strategies/en.rb', line 8

def convert figures
  @figures = figures.reverse
  
  @words = strings
  @words.empty? ? zero : @words.reverse.join(' ')
end