Class: I18n::Backend::I81n

Inherits:
Simple
  • Object
show all
Defined in:
lib/i81n.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_patternObject (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 = [], options = {})
  if ignore_pattern && ignore_pattern =~ key.to_s
    super
  else
    super || key.to_s
  end
end