Class: NumbersAndWords::Translations::Es
Constant Summary
Constants inherited
from Base
Base::I18N_NAMESPACE
Instance Method Summary
collapse
#micro, #micro_prefix, #micros
#mega, #megs, #micro_separator, #teens, #tens, #union
Methods inherited from Base
#t
Instance Method Details
#hundreds(number, options = {}) ⇒ Object
31
32
33
34
35
|
# File 'lib/numbers_and_words/translations/es.rb', line 31
def hundreds(number, options = {})
return t('hundreds.apocopated') if options[:is_apocopated]
t([:hundreds, options[:gender]].join('.'))[number]
end
|
#ones(number, options = {}) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/numbers_and_words/translations/es.rb', line 13
def ones(number, options = {})
return if options[:is_one_thousand]
return t('ones.apocopated') if number == 1 &&
options[:is_apocopated]
t([:ones, options[:gender]].join('.'))[number]
end
|
#tens_with_ones(numbers, options = {}) ⇒ Object
21
22
23
|
# File 'lib/numbers_and_words/translations/es.rb', line 21
def tens_with_ones(numbers, options = {})
super(numbers, options.merge(separator: " #{union} "))
end
|
#twenties_with_ones(numbers, options = {}) ⇒ Object
25
26
27
28
29
|
# File 'lib/numbers_and_words/translations/es.rb', line 25
def twenties_with_ones(numbers, options = {})
return t('twenties.apocopated') if options[:is_apocopated]
t([:twenties, options[:gender]].join('.'))[numbers[0]]
end
|
#zero(_options = {}) ⇒ Object
9
10
11
|
# File 'lib/numbers_and_words/translations/es.rb', line 9
def zero(_options = {})
t('ones.male')[0]
end
|