Class: NumbersAndWords::WordsArray

Inherits:
Array
  • Object
show all
Defined in:
lib/numbers_and_words/helper_classes/words_array.rb

Instance Method Summary collapse

Methods inherited from Array

#to_figures, #to_words

Instance Method Details

#join(options = {}) ⇒ Object



7
8
9
# File 'lib/numbers_and_words/helper_classes/words_array.rb', line 7

def join(options = {})
  local_language { Strategies.array_joiner.new(to_a, options).run }
end

#local_language(&block) ⇒ Object



11
12
13
# File 'lib/numbers_and_words/helper_classes/words_array.rb', line 11

def local_language(&block)
  ::I18n.with_locale(I18n.local_language, &block)
end