Module: Kabal::DeutschRules::Declinations

Defined in:
lib/kabal/languages/deutsch/declinations.rb

Class Method Summary collapse

Class Method Details

.name_with_declination(number_name, count) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/kabal/languages/deutsch/declinations.rb', line 4

def self.name_with_declination(number_name, count)
  if count != 1
    if number_name[-1, 1] == "n"
      return number_name + "en"
    elsif number_name[-1, 1] == "e"
      return number_name + "n"
    end
  end
  number_name
end