Class: I18n::ExtraTranslations::Store

Inherits:
Hash
  • Object
show all
Defined in:
lib/i18n/extra_translations/store.rb

Instance Method Summary collapse

Instance Method Details

#miss(l, k, o) ⇒ Object



5
# File 'lib/i18n/extra_translations/store.rb', line 5

def miss(l, k, o) ; add_key(l, k, o, :missing) end

#use(l, k, o) ⇒ Object



4
# File 'lib/i18n/extra_translations/store.rb', line 4

def use(l, k, o) ; add_key(l, k , o, :used) end

#used?(keys) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/i18n/extra_translations/store.rb', line 7

def used?(keys)
  keys.inject(self){ |h, k| h.kind_of?(Hash) ? h[k] : (break h[k]) } == :used rescue false
end