Class: PutText::Rails::Extractor

Inherits:
Object
  • Object
show all
Defined in:
lib/puttext-rails/extractor.rb

Instance Method Summary collapse

Instance Method Details

#extractPOFile

Extract string from the Rails project this gem is included in.

Returns:

  • (POFile)

    a POFile object containing the extracted strings.



11
12
13
14
15
16
17
18
19
# File 'lib/puttext-rails/extractor.rb', line 11

def extract
  puttext_extractor = PutText::Extractor.new
  po_file = puttext_extractor.extract(root_path)

  errors_file = extract_errors
  po_file.merge(errors_file)

  po_file
end