module Pixmatch::Utils

@private

Private Class Methods

handle_error(json_response) click to toggle source
# File lib/pixmatch/utils.rb, line 8
def self.handle_error(json_response)
  raise Pixmatch::Error.new(json_response) if (json_response['status'] != 'ok')
end
parse_json(json) click to toggle source

Parses JSON and returns a Hashie::Mash

# File lib/pixmatch/utils.rb, line 13
def self.parse_json(json)
  Hashie::Mash.new(JSON.parse(json))
end