Class: NumbersAndWords::Strategies::FiguresConverter::Languages::Cs
- Inherits:
-
Base
- Object
- Base
- NumbersAndWords::Strategies::FiguresConverter::Languages::Cs
show all
- Defined in:
- lib/numbers_and_words/strategies/figures_converter/languages/cs.rb
Instance Attribute Summary
Attributes inherited from Base
#decorator, #figures, #language, #options, #translations
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #run
Instance Method Details
#gender ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/cs.rb', line 23
def gender
@current_capacity ||= 0
if @current_capacity.zero?
options.gender.result
elsif @current_capacity > 2 && @current_capacity.odd?
:female else
:male
end
end
|
#megs(*args) ⇒ Object
19
20
21
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/cs.rb', line 19
def megs(*args)
super({ number: @figures.number_in_capacity(@current_capacity) }.merge(args.first || {}))
end
|
#zero ⇒ Object
15
16
17
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/cs.rb', line 15
def zero
super(internal_options) unless maybe_remove_zero
end
|