class NumbersAndWords::Strategies::FiguresConverter::Languages::Hu

Public Instance Methods

complex_number_to_words() click to toggle source
# File lib/numbers_and_words/strategies/figures_converter/languages/hu.rb, line 32
def complex_number_to_words
  count = @figures.capacity_count
  (1..count).map do |capacity|
    @current_capacity = capacity
    capacity_iteration.flatten
  end.reject(&:empty?)
end
greater_than_2000?() click to toggle source
# File lib/numbers_and_words/strategies/figures_converter/languages/hu.rb, line 16
def greater_than_2000?
  @figures.length > 4 || (@figures.length == 4 && @figures.last >= 2)
end
inner_reverse_words() click to toggle source
# File lib/numbers_and_words/strategies/figures_converter/languages/hu.rb, line 12
def inner_reverse_words
  @strings.collect { |iteration| iteration.reverse.join }
end
maybe_ordinal(type) click to toggle source
# File lib/numbers_and_words/strategies/figures_converter/languages/hu.rb, line 56
def maybe_ordinal(type)
  @options.ordinal.result type
end
print_words() click to toggle source
simple_number_to_words() click to toggle source
# File lib/numbers_and_words/strategies/figures_converter/languages/hu.rb, line 40
def simple_number_to_words
  if @figures.teens || @figures.tens
    [complex_tens]
  elsif @figures.ones
    [ones]
  else
    []
  end
end
strings_logic() click to toggle source
# File lib/numbers_and_words/strategies/figures_converter/languages/hu.rb, line 20
def strings_logic
  if @figures.capacity_count
    number_without_capacity_to_words + complex_number_to_words
  elsif @figures.hundreds
    [hundreds_number_to_words]
  elsif @figures.tens || @figures.ones
    [simple_number_to_words]
  else
    []
  end
end