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



5
6
7
# File 'lib/numbers_and_words/helper_classes/words_array.rb', line 5

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

#local_languageObject



9
10
11
# File 'lib/numbers_and_words/helper_classes/words_array.rb', line 9

def local_language
  ::I18n.with_locale(I18n.local_language) { yield }
end