Module: Makura::Plugin::Localize::SingletonMethods

Defined in:
lib/makura/plugin/localize.rb

Instance Method Summary collapse

Instance Method Details

#default_languageObject



54
55
56
# File 'lib/makura/plugin/localize.rb', line 54

def default_language
  @default_language ||= 'en'
end

#default_language=(dl) ⇒ Object



50
51
52
# File 'lib/makura/plugin/localize.rb', line 50

def default_language=(dl)
  @default_language = dl
end

#localized(*keys) ⇒ Object



42
43
44
45
46
47
48
# File 'lib/makura/plugin/localize.rb', line 42

def localized(*keys)
  keys.each do |key|
    key = key.to_s
    class_eval(LOCALIZE_GET.gsub('%key%', key))
    class_eval(LOCALIZE_SET.gsub('%key%', key))
  end
end