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



152
153
154
# File 'lib/biodiversity/parser/gnparser.rb', line 152

def format
  'compact'
end

#parse_output(output) ⇒ Object



148
149
150
# File 'lib/biodiversity/parser/gnparser.rb', line 148

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