Class Index [+]

Quicksearch

ActiveLdap::GetTextFallback

Public Class Methods

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

Public Instance Methods

N_(msg_id) click to toggle source
    # File lib/active_ldap/get_text_fallback.rb, line 30
30:     def N_(msg_id)
31:       msg_id
32:     end
Nn_(msg_id, msg_id_plural) click to toggle source
    # File lib/active_ldap/get_text_fallback.rb, line 34
34:     def Nn_(msg_id, msg_id_plural)
35:       [msg_id, msg_id_plural]
36:     end
_(msg_id) click to toggle source
Alias for: gettext
bindtextdomain(domain_name, *args) click to toggle source
    # File lib/active_ldap/get_text_fallback.rb, line 10
10:     def bindtextdomain(domain_name, *args)
11:     end
gettext(msg_id) click to toggle source
    # File lib/active_ldap/get_text_fallback.rb, line 13
13:     def gettext(msg_id)
14:       msg_id
15:     end
Also aliased as: _
n_(arg1, arg2, arg3=nil) click to toggle source
Alias for: ngettext
ngettext(arg1, arg2, arg3=nil) click to toggle source
    # File lib/active_ldap/get_text_fallback.rb, line 17
17:     def ngettext(arg1, arg2, arg3=nil)
18:       if arg1.kind_of?(Array)
19:         msg_id = arg1[0]
20:         msg_id_plural = arg1[1]
21:         n = arg2
22:       else
23:         msg_id = arg1
24:         msg_id_plural = arg2
25:         n = arg3
26:       end
27:       n == 1 ? msg_id : msg_id_plural
28:     end
Also aliased as: n_
s_(msg_id, div='|') click to toggle source
Alias for: sgettext
sgettext(msg_id, div='|') click to toggle source
    # File lib/active_ldap/get_text_fallback.rb, line 38
38:     def sgettext(msg_id, div='|')
39:       index = msg_id.rindex(div)
40:       if index
41:         msg_id[(index + 1)..1]
42:       else
43:         msg_id
44:       end
45:     end
Also aliased as: s_

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.