Class: NumbersAndWords::Strategies::FiguresConverter::Options::En::HundredsWithUnion
- Inherits:
-
Object
- Object
- NumbersAndWords::Strategies::FiguresConverter::Options::En::HundredsWithUnion
- Defined in:
- lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb
Direct Known Subclasses
NumbersAndWords::Strategies::FiguresConverter::Options::EnGb::HundredsWithUnion
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#strategy ⇒ Object
Returns the value of attribute strategy.
Instance Method Summary collapse
-
#initialize(proxy, *args, &block) ⇒ HundredsWithUnion
constructor
A new instance of HundredsWithUnion.
- #modify_or_leave(hundreds) ⇒ Object
Constructor Details
#initialize(proxy, *args, &block) ⇒ HundredsWithUnion
Returns a new instance of HundredsWithUnion.
9 10 11 12 |
# File 'lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb', line 9 def initialize proxy, *args, &block @strategy = proxy.strategy @options = proxy. end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
7 8 9 |
# File 'lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb', line 7 def @options end |
#strategy ⇒ Object
Returns the value of attribute strategy.
7 8 9 |
# File 'lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb', line 7 def strategy @strategy end |
Instance Method Details
#modify_or_leave(hundreds) ⇒ Object
14 15 16 17 |
# File 'lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb', line 14 def modify_or_leave hundreds hundreds = "#{hundreds} #{translations.union}" if active? && !round_hundred? hundreds end |