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