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
-
#response_parts ⇒ Object
readonly
Returns the value of attribute response_parts.
Instance Method Summary collapse
- #headers ⇒ Object
-
#initialize(data, response_parts = []) ⇒ Request
constructor
A new instance of Request.
- #method ⇒ Object
- #time ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(data, response_parts = []) ⇒ Request
Returns a new instance of Request.
5 6 7 8 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 5 def initialize(data, response_parts = []) @data = data @response_parts = response_parts end |
Instance Attribute Details
#response_parts ⇒ Object (readonly)
Returns the value of attribute response_parts.
3 4 5 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 3 def response_parts @response_parts end |
Instance Method Details
#headers ⇒ Object
18 19 20 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 18 def headers @data['headers'] end |
#method ⇒ Object
14 15 16 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 14 def method @data['method'] end |
#time ⇒ Object
22 23 24 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 22 def time @data['time'] && Time.parse(@data['time']) end |
#url ⇒ Object
10 11 12 |
# File 'lib/capybara/poltergeist/network_traffic/request.rb', line 10 def url @data['url'] end |