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.



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

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.



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

def elements
  @elements
end

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

#strategyObject

Returns the value of attribute strategy.



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

def strategy
  @strategy
end

#stringsObject

Returns the value of attribute strings.



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

def strings
  @strings
end

#translationsObject

Returns the value of attribute translations.



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

def translations
  @translations
end

Instance Method Details

#joinObject



17
18
19
# File 'lib/numbers_and_words/strategies/array_joiner/languages/base.rb', line 17

def join
  elements_logic
end