Class: Biodiversity::Parser::GnParser::Compact

Inherits:
Biodiversity::Parser::GnParser
  • Object
show all
Defined in:
lib/biodiversity/parser/gnparser.rb

Overview

gnparser interface to JSON-formatted output

Instance Method Summary collapse

Instance Method Details

#formatObject



140
141
142
# File 'lib/biodiversity/parser/gnparser.rb', line 140

def format
  'compact'
end

#parse_output(output) ⇒ Object



136
137
138
# File 'lib/biodiversity/parser/gnparser.rb', line 136

def parse_output(output)
  JSON.parse(output, symbolize_names: true).tap { |o| o&.dig(:parserVersion)&.sub!(/^/, 'GNparser ') }
end