Class: Capybara::Poltergeist::NetworkTraffic::Request
- Inherits:
-
Object
- Object
- Capybara::Poltergeist::NetworkTraffic::Request
- Defined in:
- lib/capybara/poltergeist/network_traffic/request.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#response_parts ⇒ Object
readonly
Returns the value of attribute response_parts.
Instance Method Summary collapse
- #headers ⇒ Object
-
#initialize(data, response_parts = [], error = nil) ⇒ Request
constructor
A new instance of Request.
- #method ⇒ Object
- #time ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(data, response_parts = [], error = nil) ⇒ Request
Returns a new instance of Request.
7 8 9 10 11 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 7 def initialize(data, response_parts = [], error = nil) @data = data @response_parts = response_parts @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
5 6 7 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 5 def error @error end |
#response_parts ⇒ Object (readonly)
Returns the value of attribute response_parts.
5 6 7 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 5 def response_parts @response_parts end |
Instance Method Details
#headers ⇒ Object
21 22 23 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 21 def headers @data['headers'] end |
#method ⇒ Object
17 18 19 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 17 def method @data['method'] end |
#time ⇒ Object
25 26 27 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 25 def time @data['time'] && Time.parse(@data['time']) end |
#url ⇒ Object
13 14 15 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 13 def url @data['url'] end |