Class: PreCommit::Message::Extractor
- Inherits:
-
Object
- Object
- PreCommit::Message::Extractor
- Defined in:
- lib/plugins/pre-commit/message/extractor.rb
Overview
Responsible for extract error messages from terminal output
Instance Method Summary collapse
-
#extract(output) ⇒ Hash
Extract data from a XML formatted
output.
Instance Method Details
#extract(output) ⇒ Hash
Extract data from a XML formatted output
15 16 17 18 19 20 21 22 |
# File 'lib/plugins/pre-commit/message/extractor.rb', line 15 def extract(output) return Domain::Checkstyle.good if output.nil? || output.empty? xml_data = Crack::XML.parse(xml_content(output)) files = xml_data['checkstyle']['file'] Domain::Checkstyle.new(extract_bad_file(files)) end |