Class: WebMock::RequestBodyDiff
- Inherits:
-
Object
- Object
- WebMock::RequestBodyDiff
- Defined in:
- lib/webmock/request_body_diff.rb
Instance Method Summary collapse
- #body_diff ⇒ Object
-
#initialize(request_signature, request_stub) ⇒ RequestBodyDiff
constructor
A new instance of RequestBodyDiff.
Constructor Details
#initialize(request_signature, request_stub) ⇒ RequestBodyDiff
Returns a new instance of RequestBodyDiff.
7 8 9 10 |
# File 'lib/webmock/request_body_diff.rb', line 7 def initialize(request_signature, request_stub) @request_signature = request_signature @request_stub = request_stub end |
Instance Method Details
#body_diff ⇒ Object
12 13 14 15 16 |
# File 'lib/webmock/request_body_diff.rb', line 12 def body_diff return {} unless request_signature_diffable? && request_stub_diffable? Hashdiff.diff(request_signature_body_hash, request_stub_body_hash) end |