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.
9 10 11 12 |
# File 'lib/webmock/request_body_diff.rb', line 9 def initialize(request_signature, request_stub) @request_signature = request_signature @request_stub = request_stub end |
Instance Method Details
#body_diff ⇒ Object
14 15 16 17 18 |
# File 'lib/webmock/request_body_diff.rb', line 14 def body_diff return {} unless request_signature_diffable? && request_stub_diffable? Hashdiff.diff(request_signature_body_hash, request_stub_body_hash) end |