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
Languages::Cs, Languages::En, Languages::Es, Languages::Fr, Languages::Hu, Languages::Ru, Languages::Ua, Languages::Vi
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.
11 12 13 14 15 16 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 11 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.
9 10 11 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 9 def elements @elements end |
#language ⇒ Object
Returns the value of attribute language.
9 10 11 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 9 def language @language end |
#options ⇒ Object
Returns the value of attribute options.
9 10 11 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 9 def @options end |
#translations ⇒ Object
Returns the value of attribute translations.
9 10 11 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 9 def translations @translations end |
Instance Method Details
#run ⇒ Object
18 19 20 |
# File 'lib/numbers_and_words/strategies/array_joiner.rb', line 18 def run language.join end |