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
Constant Summary collapse
- EMPTY =
{ 'checkstyle' => { 'file' => [] } }
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 |
# File 'lib/plugins/pre_commit/message/extractor.rb', line 15 def extract(output) return EMPTY if output.nil? || output.empty? Crack::XML.parse(xml_content(output)) end |