class ApiBlueprint::Parser

Public Instance Methods

parse(body) click to toggle source

 Nothing special here. Write a class which overrides parse

to make a custom parser.
# File lib/api-blueprint/parser.rb, line 6
def parse(body)
  body.is_a?(String) ? JSON.parse(body) : body
rescue JSON::ParserError
  {}
end