class NumbersAndWords::Strategies::FiguresConverter::Options::En::HundredsWithUnion
Attributes
options[RW]
strategy[RW]
Public Class Methods
new(proxy, *_args)
click to toggle source
# File lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb, line 11 def initialize(proxy, *_args) @strategy = proxy.strategy @options = proxy.options end
Public Instance Methods
modify_or_leave(hundreds)
click to toggle source
# File lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb, line 16 def modify_or_leave(hundreds) hundreds = "#{hundreds} #{translations.union}" if active? && !round_hundred? hundreds end
Private Instance Methods
active?()
click to toggle source
# File lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb, line 23 def active? @options[:hundreds_with_union] end
round_hundred?()
click to toggle source
# File lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb, line 27 def round_hundred? @strategy.language.figures.round_hundred? end
translations()
click to toggle source
# File lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb, line 31 def translations @strategy.translations end