Class/Module Index [+]

Quicksearch

ActiveLdap::GetTextFallback::Translation

Public Class Methods

included(base) click to toggle source
# File lib/active_ldap/get_text_fallback.rb, line 17
def included(base)
  base.extend(self)
end

Public Instance Methods

N_(msg_id) click to toggle source
# File lib/active_ldap/get_text_fallback.rb, line 39
def N_(msg_id)
  msg_id
end
Nn_(msg_id, msg_id_plural) click to toggle source
# File lib/active_ldap/get_text_fallback.rb, line 43
def Nn_(msg_id, msg_id_plural)
  [msg_id, msg_id_plural]
end
_(msg_id) click to toggle source
# File lib/active_ldap/get_text_fallback.rb, line 22
def _(msg_id)
  msg_id
end
n_(arg1, arg2, arg3=nil) click to toggle source
# File lib/active_ldap/get_text_fallback.rb, line 26
def n_(arg1, arg2, arg3=nil)
  if arg1.kind_of?(Array)
    msg_id = arg1[0]
    msg_id_plural = arg1[1]
    n = arg2
  else
    msg_id = arg1
    msg_id_plural = arg2
    n = arg3
  end
  n == 1 ? msg_id : msg_id_plural
end
s_(msg_id, div='|') click to toggle source
# File lib/active_ldap/get_text_fallback.rb, line 47
def s_(msg_id, div='|')
  index = msg_id.rindex(div)
  if index
    msg_id[(index + 1)..-1]
  else
    msg_id
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.