Class: Joust::Version20
- Inherits:
-
ExpectedResponse
- Object
- ExpectedResponse
- Joust::Version20
- Defined in:
- lib/joust/expected_response/version_20.rb
Instance Method Summary collapse
Instance Method Details
#match?(json_hash) ⇒ Boolean
4 5 6 7 |
# File 'lib/joust/expected_response/version_20.rb', line 4 def match?(json_hash) return false unless super (json_hash['jsonrpc'] == '2.0' && (!!json_hash['result'] ^ !!json_hash['error'])) || json_hash.empty? end |