Class: WebkitRemote::Event::NetworkCacheHit
- Inherits:
-
WebkitRemote::Event
- Object
- WebkitRemote::Event
- WebkitRemote::Event::NetworkCacheHit
- Defined in:
- lib/webkit_remote/client/network_events.rb
Overview
Emitted when a resource is served from the local cache.
Instance Attribute Summary collapse
-
#resource ⇒ WebkitRemote::Client::NetworkResource
readonly
Information about the resource fetched by this network operation.
Attributes inherited from WebkitRemote::Event
Instance Method Summary collapse
-
#initialize(rpc_event, client) ⇒ NetworkCacheHit
constructor
A new instance of NetworkCacheHit.
Methods inherited from WebkitRemote::Event
can_reach?, can_receive?, class_for, for, #matches?, register, register_class
Constructor Details
#initialize(rpc_event, client) ⇒ NetworkCacheHit
Returns a new instance of NetworkCacheHit.
99 100 101 102 103 104 |
# File 'lib/webkit_remote/client/network_events.rb', line 99 def initialize(rpc_event, client) super @resource = client.network_resource raw_data['requestId'] @resource.add_event self end |
Instance Attribute Details
#resource ⇒ WebkitRemote::Client::NetworkResource (readonly)
Returns information about the resource fetched by this network operation.
96 97 98 |
# File 'lib/webkit_remote/client/network_events.rb', line 96 def resource @resource end |