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
87 88 89 |
# File 'lib/faraday/adapter/test.rb', line 87 def block @block end |
#body ⇒ Object
Returns the value of attribute body
87 88 89 |
# File 'lib/faraday/adapter/test.rb', line 87 def body @body end |
#path ⇒ Object
Returns the value of attribute path
87 88 89 |
# File 'lib/faraday/adapter/test.rb', line 87 def path @path end |
Instance Method Details
#matches?(request_path, request_body) ⇒ Boolean
88 89 90 |
# File 'lib/faraday/adapter/test.rb', line 88 def matches?(request_path, request_body) request_path == path && (body.to_s.size.zero? || request_body == body) end |
#to_s ⇒ Object
92 93 94 |
# File 'lib/faraday/adapter/test.rb', line 92 def to_s "#{path} #{body}" end |