class JSend::FailMessageParser
Public Class Methods
response_from_hash(hash)
click to toggle source
# File lib/jsend/parser/fail_message_parser.rb, line 8 def self.response_from_hash(hash) raise InvalidData if hash['data'].nil? raise InvalidData if HashUtils.has_fields_different_from(hash, %w(status data)) FailResponse.new hash['data'] end