Class: NumbersAndWords::Strategies::FiguresConverter::Languages::Ka

Inherits:
Base
  • Object
show all
Defined in:
lib/numbers_and_words/strategies/figures_converter/languages/ka.rb

Instance Attribute Summary

Attributes inherited from Base

#decorator, #figures, #language, #options, #translations

Instance Method Summary collapse

Methods inherited from Base

#initialize, #run

Constructor Details

This class inherits a constructor from NumbersAndWords::Strategies::FiguresConverter::Base

Instance Method Details

#capacity_iterationObject



6
7
8
9
10
11
12
# File 'lib/numbers_and_words/strategies/figures_converter/languages/ka.rb', line 6

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

#hundredsObject



14
15
16
# File 'lib/numbers_and_words/strategies/figures_converter/languages/ka.rb', line 14

def hundreds
  super({ only_hundreds: figures[0, 2] == [0, 0] })
end

#megsObject



18
19
20
21
22
# File 'lib/numbers_and_words/strategies/figures_converter/languages/ka.rb', line 18

def megs
  prefix = (:partials if @figures.hundreds || @figures.tens || @figures.ones)

  super(prefix: prefix)
end