Module: NumbersAndWords::Strategies::ArrayJoiner::Languages::Families::Base

Included in:
Base
Defined in:
lib/numbers_and_words/strategies/array_joiner/languages/families/base.rb

Instance Method Summary collapse

Instance Method Details

#elements_logicObject



7
8
9
# File 'lib/numbers_and_words/strategies/array_joiner/languages/families/base.rb', line 7

def elements_logic
  @elements.first.empty? ? @elements.last : @elements.join(union_element)
end

#union_elementObject



11
12
13
# File 'lib/numbers_and_words/strategies/array_joiner/languages/families/base.rb', line 11

def union_element
  union_separator.empty? ? ' ' : " #{union_separator} "
end

#union_separatorObject



15
16
17
# File 'lib/numbers_and_words/strategies/array_joiner/languages/families/base.rb', line 15

def union_separator
  options[:union_separator] || @translations.union_separator || ''
end