Class: NumbersAndWords::Strategies::FiguresConverter::Languages::Es
- Inherits:
-
Base
- Object
- Base
- NumbersAndWords::Strategies::FiguresConverter::Languages::Es
show all
- Defined in:
- lib/numbers_and_words/strategies/figures_converter/languages/es.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
#capacity_iteration ⇒ Object
8
9
10
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/es.rb', line 8
def capacity_iteration
super.compact
end
|
#hundreds ⇒ Object
29
30
31
32
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/es.rb', line 29
def hundreds
super({ gender:,
is_apocopated: hundred_apocopated? })
end
|
#megs ⇒ Object
34
35
36
37
38
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/es.rb', line 34
def megs
return @translations.megs(1, number: 1) if long_scale_thousand?
super({ number: @figures.number_in_capacity(@current_capacity) })
end
|
#ones ⇒ Object
16
17
18
19
20
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/es.rb', line 16
def ones
super({ gender:,
is_one_thousand: one_thousand?,
is_apocopated: one_apocopated? })
end
|
#tens_with_ones ⇒ Object
22
23
24
25
26
27
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/es.rb', line 22
def tens_with_ones
options = { gender:, is_apocopated: one_apocopated? }
return @translations.twenties_with_ones(@figures, options) if @figures.tens == 2
super(options)
end
|
#zero ⇒ Object
12
13
14
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/es.rb', line 12
def zero
super unless maybe_remove_zero
end
|