Class: NumbersAndWords::Strategies::FiguresConverter::Base
- Inherits:
-
Object
- Object
- NumbersAndWords::Strategies::FiguresConverter::Base
- Defined in:
- lib/numbers_and_words/strategies/figures_converter.rb
Direct Known Subclasses
Languages::Cs, Languages::Da, Languages::De, Languages::En, Languages::Es, Languages::Et, Languages::Fr, Languages::Hu, Languages::Hy, Languages::It, Languages::Ka, Languages::Kz, Languages::Lt, Languages::Lv, Languages::Nl, Languages::Pt, Languages::Ru, Languages::Se, Languages::Tr, Languages::Ua, Languages::Vi
Instance Attribute Summary collapse
-
#decorator ⇒ Object
Returns the value of attribute decorator.
-
#figures ⇒ Object
Returns the value of attribute figures.
-
#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(figures, options = {}) ⇒ Base
constructor
A new instance of Base.
- #run ⇒ Object
Constructor Details
#initialize(figures, options = {}) ⇒ Base
Returns a new instance of Base.
13 14 15 16 17 18 19 20 |
# File 'lib/numbers_and_words/strategies/figures_converter.rb', line 13 def initialize(figures, = {}) @figures = figures.reverse @decorator = Decorators.factory(self, ) @options = Options::Proxy.new(self, ) @translations = Translations.factory @language = Languages.factory(self) end |
Instance Attribute Details
#decorator ⇒ Object
Returns the value of attribute decorator.
11 12 13 |
# File 'lib/numbers_and_words/strategies/figures_converter.rb', line 11 def decorator @decorator end |
#figures ⇒ Object
Returns the value of attribute figures.
11 12 13 |
# File 'lib/numbers_and_words/strategies/figures_converter.rb', line 11 def figures @figures end |
#language ⇒ Object
Returns the value of attribute language.
11 12 13 |
# File 'lib/numbers_and_words/strategies/figures_converter.rb', line 11 def language @language end |
#options ⇒ Object
Returns the value of attribute options.
11 12 13 |
# File 'lib/numbers_and_words/strategies/figures_converter.rb', line 11 def @options end |
#translations ⇒ Object
Returns the value of attribute translations.
11 12 13 |
# File 'lib/numbers_and_words/strategies/figures_converter.rb', line 11 def translations @translations end |
Instance Method Details
#run ⇒ Object
22 23 24 |
# File 'lib/numbers_and_words/strategies/figures_converter.rb', line 22 def run around { language.words } end |