Class: NumbersAndWords::Strategies::ArrayJoiner::Base
- Inherits:
-
Object
- Object
- NumbersAndWords::Strategies::ArrayJoiner::Base
- Defined in:
- lib/numbers_and_words/strategies/array_joiner.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#elements ⇒ Object
Returns the value of attribute elements.
-
#language ⇒ Object
Returns the value of attribute language.
-
#options ⇒ Object
Returns the value of attribute options.
-
#translations ⇒ Object
Returns the value of attribute translations.
Instance Method Summary collapse
-
#initialize(elements, options = {}) ⇒ Base
constructor
A new instance of Base.
- #run ⇒ Object
Constructor Details
#initialize(elements, options = {}) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 15 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 10 def initialize elements, = {} @elements = elements @options = @translations = Translations.factory @language = Languages.factory(self) end |
Instance Attribute Details
#elements ⇒ Object
Returns the value of attribute elements.
8 9 10 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 8 def elements @elements end |
#language ⇒ Object
Returns the value of attribute language.
8 9 10 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 8 def language @language end |
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 8 def @options end |
#translations ⇒ Object
Returns the value of attribute translations.
8 9 10 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 8 def translations @translations end |
Instance Method Details
#run ⇒ Object
17 18 19 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 17 def run language.join end |