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:
14 15 16 17 |
# File 'lib/gettext_i18n_rails/ruby_gettext_extractor.rb', line 14 def parse(file, targets = []) # :nodoc: content = File.read(file) parse_string(content, file, targets) end |
#parse_string(content, file, targets = []) ⇒ Object
19 20 21 22 23 |
# File 'lib/gettext_i18n_rails/ruby_gettext_extractor.rb', line 19 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:
25 26 27 |
# File 'lib/gettext_i18n_rails/ruby_gettext_extractor.rb', line 25 def target?(file) # :nodoc: return file =~ /\.rb$/ end |