Class: WebkitRemote::Event::ConsoleMessageRepeated
- Inherits:
-
WebkitRemote::Event
- Object
- WebkitRemote::Event
- WebkitRemote::Event::ConsoleMessageRepeated
- Defined in:
- lib/webkit_remote/client/console_events.rb
Overview
Emitted when the same console message is produced repeatedly.
Instance Attribute Summary collapse
-
#count ⇒ Number
readonly
The number of times that the message was repeated.
-
#message ⇒ WebkitRemote::Client::ConsoleMessage
readonly
The repeated message.
Attributes inherited from WebkitRemote::Event
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rpc_event, client) ⇒ ConsoleMessageRepeated
constructor
A new instance of ConsoleMessageRepeated.
Methods inherited from WebkitRemote::Event
can_receive?, class_for, for, #matches?, register, register_class
Constructor Details
#initialize(rpc_event, client) ⇒ ConsoleMessageRepeated
Returns a new instance of ConsoleMessageRepeated.
62 63 64 65 66 67 68 |
# File 'lib/webkit_remote/client/console_events.rb', line 62 def initialize(rpc_event, client) super @message = client..last @count = raw_data['count'] ? raw_data['count'].to_i : nil @message.count = @count if @count end |
Instance Attribute Details
#count ⇒ Number (readonly)
Returns the number of times that the message was repeated.
59 60 61 |
# File 'lib/webkit_remote/client/console_events.rb', line 59 def count @count end |
#message ⇒ WebkitRemote::Client::ConsoleMessage (readonly)
Returns the repeated message.
56 57 58 |
# File 'lib/webkit_remote/client/console_events.rb', line 56 def @message end |
Class Method Details
.can_reach?(client) ⇒ Boolean
71 72 73 |
# File 'lib/webkit_remote/client/console_events.rb', line 71 def self.can_reach?(client) client.console_events end |