Class: Faraday::Adapter::Test::Stub
- Defined in:
- lib/faraday/adapter/test.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#body ⇒ Object
Returns the value of attribute body.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block
74 75 76 |
# File 'lib/faraday/adapter/test.rb', line 74 def block @block end |
#body ⇒ Object
Returns the value of attribute body
74 75 76 |
# File 'lib/faraday/adapter/test.rb', line 74 def body @body end |
#path ⇒ Object
Returns the value of attribute path
74 75 76 |
# File 'lib/faraday/adapter/test.rb', line 74 def path @path end |
Instance Method Details
#matches?(request_path, request_body) ⇒ Boolean
75 76 77 |
# File 'lib/faraday/adapter/test.rb', line 75 def matches?(request_path, request_body) request_path == path && (body.to_s.size.zero? || request_body == body) end |
#to_s ⇒ Object
79 80 81 |
# File 'lib/faraday/adapter/test.rb', line 79 def to_s "#{path} #{body}" end |