Module: Merb::Global::Plural

Defined in:
lib/merb_global/plural.rb

Class Method Summary collapse

Class Method Details

.which_form(n, plural) ⇒ Object

Returns which form should be returned

Parameters

n<Fixnum>

A number of elements

plural<String>

Expression

Returns

Fixnum

Which form should be translated



15
16
17
# File 'lib/merb_global/plural.rb', line 15

def self.which_form(n, plural)
  @parser.parse(plural).to_lambda.call(n)
end