Module: RubyGettextExtractor
- Extended by:
- RubyGettextExtractor
- Included in:
- RubyGettextExtractor
- Defined in:
- lib/gettext_i18n_rails/ruby_gettext_extractor.rb
Defined Under Namespace
Classes: Extractor
Instance Method Summary collapse
-
#parse(file, targets = []) ⇒ Object
:nodoc:.
- #parse_string(content, file, targets = []) ⇒ Object
-
#target?(file) ⇒ Boolean
:nodoc:.
Instance Method Details
#parse(file, targets = []) ⇒ Object
:nodoc:
18 19 20 21 |
# File 'lib/gettext_i18n_rails/ruby_gettext_extractor.rb', line 18 def parse(file, targets = []) # :nodoc: content = File.read(file) parse_string(content, file, targets) end |
#parse_string(content, file, targets = []) ⇒ Object
23 24 25 26 27 |
# File 'lib/gettext_i18n_rails/ruby_gettext_extractor.rb', line 23 def parse_string(content, file, targets=[]) # file is just for information in error messages parser = Extractor.new(file, targets) parser.run(content) end |
#target?(file) ⇒ Boolean
:nodoc:
29 30 31 |
# File 'lib/gettext_i18n_rails/ruby_gettext_extractor.rb', line 29 def target?(file) # :nodoc: return file =~ /\.rb$/ end |