Class: I18n::Backend::I81n
- Inherits:
-
Simple
- Object
- Simple
- I18n::Backend::I81n
- Defined in:
- lib/i81n.rb
Instance Attribute Summary collapse
-
#ignore ⇒ Object
readonly
Returns the value of attribute ignore.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ I81n
constructor
A new instance of I81n.
- #lookup(locale, key, scope = [], options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ I81n
Returns a new instance of I81n.
5 6 7 8 |
# File 'lib/i81n.rb', line 5 def initialize( = {}) @ignore = [:ignore] super() end |
Instance Attribute Details
#ignore ⇒ Object (readonly)
Returns the value of attribute ignore.
3 4 5 |
# File 'lib/i81n.rb', line 3 def ignore @ignore end |
Instance Method Details
#lookup(locale, key, scope = [], options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/i81n.rb', line 10 def lookup(locale, key, scope = [], = {}) return super if .delete(:i81n) == false return super if [:default] key_str = key.to_s if ignore && ignore =~ key_str super else super || key_str end end |