Class: WebMock::RequestBodyDiff::PrettyPrintableThingy
- Inherits:
-
Struct
- Object
- Struct
- WebMock::RequestBodyDiff::PrettyPrintableThingy
- Defined in:
- lib/specdiff/webmock.rb
Instance Attribute Summary collapse
-
#specdiff ⇒ Object
Returns the value of attribute specdiff.
Instance Method Summary collapse
-
#empty? ⇒ Boolean
webmock does not print the diff if it responds true to this.
-
#pretty_print(pp) ⇒ Object
webmock prints the diff by passing us to PP.pp, which in turn uses this method.
Instance Attribute Details
#specdiff ⇒ Object
Returns the value of attribute specdiff
11 12 13 |
# File 'lib/specdiff/webmock.rb', line 11 def specdiff @specdiff end |
Instance Method Details
#empty? ⇒ Boolean
webmock does not print the diff if it responds true to this.
13 14 15 |
# File 'lib/specdiff/webmock.rb', line 13 def empty? specdiff.empty? end |
#pretty_print(pp) ⇒ Object
webmock prints the diff by passing us to PP.pp, which in turn uses this method.
19 20 21 22 |
# File 'lib/specdiff/webmock.rb', line 19 def pretty_print(pp) pp.text("\r") # remove a space that isn't supposed to be there pp.text(specdiff.to_s) end |