Module: I18n::Index
- Defined in:
- lib/i18n/index.rb,
lib/i18n/index/key.rb,
lib/i18n/index/base.rb,
lib/i18n/index/file.rb,
lib/i18n/index/format.rb,
lib/i18n/index/simple.rb,
lib/i18n/index/occurence.rb,
lib/i18n/index/simple/data.rb,
lib/i18n/index/simple/storage.rb
Defined Under Namespace
Modules: Format
Classes: Base, File, Files, Key, Occurence, Simple
Constant Summary
collapse
- @@implementation =
I18n::Index::Simple
- @@parser =
Ripper::RubyBuilder
- @@filters =
{ '.erb' => lambda { |source| Erb::Stripper.new.to_ruby(source) } }
- @@pattern =
'**/*.{rb,erb}'
Class Method Summary
collapse
Class Method Details
.filter(source, filename) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/i18n/index.rb', line 25
def filter(source, filename)
filters.each do |extname, filter|
source = filter.call(source) if ::File.extname(filename) == extname
end
source
end
|
.load_or_create(*args) ⇒ Object
21
22
23
|
# File 'lib/i18n/index.rb', line 21
def load_or_create(*args)
implementation.load_or_create(*args)
end
|
.new(*args) ⇒ Object
17
18
19
|
# File 'lib/i18n/index.rb', line 17
def new(*args)
implementation.new(*args)
end
|