lib/numbers_and_words/strategies/figures_converter/languages/tr.rb
# frozen_string_literal: true
module NumbersAndWords
module Strategies
module FiguresConverter
module Languages
class Tr < Base
def capacity_iteration
words = []
capacity_words = words_in_capacity(@current_capacity)
words.push(megs) unless capacity_words.empty?
words += capacity_words unless thousand? && one?
words
end
private
def one?
words_in_capacity(@current_capacity) == [translations.ones(1)]
end
def thousand?
@current_capacity == FiguresArray::THOUSAND_CAPACITY
end
end
end
end
end
end