class NumbersAndWords::Translations::Es

Public Instance Methods

hundreds(number, options = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# 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 = {}) click to toggle source
# File lib/numbers_and_words/translations/es.rb, line 9
def zero(_options = {})
  t('ones.male')[0]
end