Sha256: a3ec45e5b24fd28a098c5cb93efc74acae0f224415f75b0dc56fb417a4f25e34
Contents?: true
Size: 277 Bytes
Versions: 134
Compression:
Stored size: 277 Bytes
Contents
module LocalizedName def localize(locale = I18n.locale.to_s) values = Hash[*self.strip.split("\n").map{|n| n.split(':', 2)}.flatten] name = values[locale.to_s] || self name.strip rescue ArgumentError self end end class String include LocalizedName end
Version data entries
134 entries across 134 versions & 5 rubygems