Class: GetText::LocalePath

Inherits:
Object
  • Object
show all
Defined in:
lib/gettext/ruby19_fix.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, topdir = nil) ⇒ LocalePath

Returns a new instance of LocalePath.



8
9
10
11
12
13
14
15
16
# File 'lib/gettext/ruby19_fix.rb', line 8

def initialize(name, topdir = nil)
  @name = name
  if topdir
    @locale_paths = ["#{topdir}/%{lang}/LC_MESSAGES/%{name}.mo", "#{topdir}/%{lang}/%{name}.mo"]
  else
    @locale_paths = self.class.default_path_rules
  end
  @locale_paths.map! {|v| v % {:name => name, :lang => '%{lang}'} }
end