Class: NumbersAndWords::Strategies::ArrayJoiner::Languages::Base

Inherits:
Object
  • Object
show all
Includes:
Families::Base
Defined in:
lib/numbers_and_words/strategies/array_joiner/languages/base.rb

Direct Known Subclasses

EnGb, PtBr

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Families::Base

#elements_logic, #micro_separator, #union_element

Constructor Details

#initialize(strategy) ⇒ Base

Returns a new instance of Base.


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

def initialize(strategy)
  @strategy = strategy
  @elements = strategy.elements
  @translations = strategy.translations
  @options = strategy.options
end

Instance Attribute Details

#elementsObject

Returns the value of attribute elements


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

def elements
  @elements
end

#optionsObject

Returns the value of attribute options


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

def options
  @options
end

#strategyObject

Returns the value of attribute strategy


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

def strategy
  @strategy
end

#stringsObject

Returns the value of attribute strings


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

def strings
  @strings
end

#translationsObject

Returns the value of attribute translations


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

def translations
  @translations
end

Instance Method Details

#joinObject


19
20
21
# File 'lib/numbers_and_words/strategies/array_joiner/languages/base.rb', line 19

def join
  elements_logic
end