class NumbersAndWords::Strategies::FiguresConverter::Options::En::HundredsWithUnion
Attributes
Public Class Methods
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
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
Source
# File lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb, line 23 def active? @options[:hundreds_with_union] end
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
Source
# File lib/numbers_and_words/strategies/figures_converter/options/en/hundreds_with_union.rb, line 31 def translations @strategy.translations end