class Sendgrid::API::REST::Response::ParseJson
Public Instance Methods
parse(body)
click to toggle source
# File lib/sendgrid/api/rest/response/parse_json.rb, line 10 def parse(body) JSON.parse(body, :symbolize_names => true) unless blank?(body) end
Private Instance Methods
blank?(string)
click to toggle source
# File lib/sendgrid/api/rest/response/parse_json.rb, line 16 def blank?(string) string.respond_to?(:empty?) ? !!string.empty? : !string end