module GetText::ClassInfo
For normalize/finding the related classes/modules. This is used for realizing the scope of TextDomain
. (see: www.yotabanana.com/hiki/ruby-gettext-scope.html)
Public Instance Methods
normalize_class(klass)
click to toggle source
normalize the class name klass should kind of the class, not object.
# File lib/gettext/class_info.rb, line 10 def normalize_class(klass) ret = (klass.kind_of? Module) ? klass : klass.class if ret.name =~ /^\#<|^$/ or ret == GetText or ret.name.nil? ret = Object end ret end