puppeteer-ruby 0.0.10 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +0 -12
  3. data/.github/workflows/docs.yml +45 -0
  4. data/.github/workflows/reviewdog.yml +15 -0
  5. data/README.md +54 -1
  6. data/lib/puppeteer.rb +37 -13
  7. data/lib/puppeteer/browser.rb +39 -26
  8. data/lib/puppeteer/cdp_session.rb +3 -19
  9. data/lib/puppeteer/concurrent_ruby_utils.rb +12 -2
  10. data/lib/puppeteer/connection.rb +16 -16
  11. data/lib/puppeteer/define_async_method.rb +23 -0
  12. data/lib/puppeteer/dom_world.rb +58 -71
  13. data/lib/puppeteer/element_handle.rb +15 -44
  14. data/lib/puppeteer/emulation_manager.rb +2 -6
  15. data/lib/puppeteer/event_callbackable.rb +11 -0
  16. data/lib/puppeteer/execution_context.rb +1 -6
  17. data/lib/puppeteer/frame.rb +38 -3
  18. data/lib/puppeteer/frame_manager.rb +7 -25
  19. data/lib/puppeteer/js_handle.rb +3 -12
  20. data/lib/puppeteer/keyboard.rb +6 -27
  21. data/lib/puppeteer/launcher.rb +6 -6
  22. data/lib/puppeteer/launcher/chrome.rb +10 -8
  23. data/lib/puppeteer/mouse.rb +8 -33
  24. data/lib/puppeteer/page.rb +132 -121
  25. data/lib/puppeteer/page/pdf_options.rb +166 -0
  26. data/lib/puppeteer/remote_object.rb +2 -5
  27. data/lib/puppeteer/target.rb +1 -1
  28. data/lib/puppeteer/touch_screen.rb +2 -7
  29. data/lib/puppeteer/version.rb +1 -1
  30. data/lib/puppeteer/wait_task.rb +2 -4
  31. data/lib/puppeteer/web_socket_transport.rb +8 -8
  32. data/puppeteer-ruby.gemspec +1 -1
  33. data/puppeteer-ruby.png +0 -0
  34. metadata +9 -102
  35. data/Dockerfile +0 -6
  36. data/docker-compose.yml +0 -15
  37. data/docs/Puppeteer.html +0 -2020
  38. data/docs/Puppeteer/AsyncAwaitBehavior.html +0 -105
  39. data/docs/Puppeteer/Browser.html +0 -2148
  40. data/docs/Puppeteer/BrowserContext.html +0 -809
  41. data/docs/Puppeteer/BrowserFetcher.html +0 -214
  42. data/docs/Puppeteer/BrowserRunner.html +0 -914
  43. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +0 -477
  44. data/docs/Puppeteer/CDPSession.html +0 -813
  45. data/docs/Puppeteer/CDPSession/Error.html +0 -124
  46. data/docs/Puppeteer/ConcurrentRubyUtils.html +0 -430
  47. data/docs/Puppeteer/Connection.html +0 -960
  48. data/docs/Puppeteer/Connection/MessageCallback.html +0 -434
  49. data/docs/Puppeteer/Connection/ProtocolError.html +0 -216
  50. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +0 -217
  51. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +0 -244
  52. data/docs/Puppeteer/ConsoleMessage.html +0 -565
  53. data/docs/Puppeteer/ConsoleMessage/Location.html +0 -433
  54. data/docs/Puppeteer/DOMWorld.html +0 -2219
  55. data/docs/Puppeteer/DOMWorld/DetachedError.html +0 -124
  56. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +0 -124
  57. data/docs/Puppeteer/DebugPrint.html +0 -233
  58. data/docs/Puppeteer/Device.html +0 -470
  59. data/docs/Puppeteer/Devices.html +0 -139
  60. data/docs/Puppeteer/ElementHandle.html +0 -2542
  61. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +0 -206
  62. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +0 -206
  63. data/docs/Puppeteer/ElementHandle/Point.html +0 -492
  64. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +0 -124
  65. data/docs/Puppeteer/EmulationManager.html +0 -454
  66. data/docs/Puppeteer/EventCallbackable.html +0 -433
  67. data/docs/Puppeteer/EventCallbackable/EventListeners.html +0 -435
  68. data/docs/Puppeteer/ExecutionContext.html +0 -998
  69. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +0 -124
  70. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +0 -357
  71. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +0 -389
  72. data/docs/Puppeteer/FileChooser.html +0 -455
  73. data/docs/Puppeteer/Frame.html +0 -3677
  74. data/docs/Puppeteer/FrameManager.html +0 -2410
  75. data/docs/Puppeteer/FrameManager/NavigationError.html +0 -124
  76. data/docs/Puppeteer/IfPresent.html +0 -222
  77. data/docs/Puppeteer/JSHandle.html +0 -1352
  78. data/docs/Puppeteer/Keyboard.html +0 -1557
  79. data/docs/Puppeteer/Keyboard/KeyDefinition.html +0 -831
  80. data/docs/Puppeteer/Keyboard/KeyDescription.html +0 -603
  81. data/docs/Puppeteer/Launcher.html +0 -237
  82. data/docs/Puppeteer/Launcher/Base.html +0 -385
  83. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +0 -124
  84. data/docs/Puppeteer/Launcher/BrowserOptions.html +0 -441
  85. data/docs/Puppeteer/Launcher/Chrome.html +0 -669
  86. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +0 -382
  87. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +0 -531
  88. data/docs/Puppeteer/Launcher/LaunchOptions.html +0 -893
  89. data/docs/Puppeteer/LifecycleWatcher.html +0 -834
  90. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +0 -363
  91. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +0 -206
  92. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +0 -124
  93. data/docs/Puppeteer/Mouse.html +0 -1105
  94. data/docs/Puppeteer/Mouse/Button.html +0 -136
  95. data/docs/Puppeteer/NetworkManager.html +0 -901
  96. data/docs/Puppeteer/NetworkManager/Credentials.html +0 -385
  97. data/docs/Puppeteer/Page.html +0 -5970
  98. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +0 -206
  99. data/docs/Puppeteer/Page/ScreenshotOptions.html +0 -845
  100. data/docs/Puppeteer/Page/ScriptTag.html +0 -555
  101. data/docs/Puppeteer/Page/StyleTag.html +0 -448
  102. data/docs/Puppeteer/Page/TargetCrashedError.html +0 -124
  103. data/docs/Puppeteer/RemoteObject.html +0 -1087
  104. data/docs/Puppeteer/Target.html +0 -1336
  105. data/docs/Puppeteer/Target/InitializeFailure.html +0 -124
  106. data/docs/Puppeteer/Target/TargetInfo.html +0 -729
  107. data/docs/Puppeteer/TimeoutError.html +0 -135
  108. data/docs/Puppeteer/TimeoutSettings.html +0 -496
  109. data/docs/Puppeteer/TouchScreen.html +0 -464
  110. data/docs/Puppeteer/Viewport.html +0 -837
  111. data/docs/Puppeteer/WaitTask.html +0 -637
  112. data/docs/Puppeteer/WaitTask/TerminatedError.html +0 -124
  113. data/docs/Puppeteer/WaitTask/TimeoutError.html +0 -206
  114. data/docs/Puppeteer/WebSocket.html +0 -673
  115. data/docs/Puppeteer/WebSocket/DriverImpl.html +0 -412
  116. data/docs/Puppeteer/WebSocketTransport.html +0 -600
  117. data/docs/Puppeteer/WebSocktTransportError.html +0 -124
  118. data/docs/_index.html +0 -823
  119. data/docs/class_list.html +0 -51
  120. data/docs/css/common.css +0 -1
  121. data/docs/css/full_list.css +0 -58
  122. data/docs/css/style.css +0 -496
  123. data/docs/file.README.html +0 -123
  124. data/docs/file_list.html +0 -56
  125. data/docs/frames.html +0 -17
  126. data/docs/index.html +0 -123
  127. data/docs/js/app.js +0 -314
  128. data/docs/js/full_list.js +0 -216
  129. data/docs/js/jquery.js +0 -4
  130. data/docs/method_list.html +0 -4075
  131. data/docs/top-level-namespace.html +0 -126
  132. data/lib/puppeteer/async_await_behavior.rb +0 -38
@@ -1,433 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Module: Puppeteer::EventCallbackable
8
-
9
- &mdash; Documentation by YARD 0.9.24
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
-
17
- <script type="text/javascript">
18
- pathId = "Puppeteer::EventCallbackable";
19
- relpath = '../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (E)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span>
41
- &raquo;
42
- <span class="title">EventCallbackable</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Module: Puppeteer::EventCallbackable
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
- <dl>
78
- <dt>Included in:</dt>
79
- <dd><span class='object_link'><a href="Browser.html" title="Puppeteer::Browser (class)">Browser</a></span>, <span class='object_link'><a href="BrowserContext.html" title="Puppeteer::BrowserContext (class)">BrowserContext</a></span>, <span class='object_link'><a href="CDPSession.html" title="Puppeteer::CDPSession (class)">CDPSession</a></span>, <span class='object_link'><a href="Connection.html" title="Puppeteer::Connection (class)">Connection</a></span>, <span class='object_link'><a href="FrameManager.html" title="Puppeteer::FrameManager (class)">FrameManager</a></span>, <span class='object_link'><a href="NetworkManager.html" title="Puppeteer::NetworkManager (class)">NetworkManager</a></span>, <span class='object_link'><a href="Page.html" title="Puppeteer::Page (class)">Page</a></span></dd>
80
- </dl>
81
-
82
-
83
-
84
- <dl>
85
- <dt>Defined in:</dt>
86
- <dd>lib/puppeteer/event_callbackable.rb</dd>
87
- </dl>
88
-
89
- </div>
90
-
91
- <h2>Defined Under Namespace</h2>
92
- <p class="children">
93
-
94
-
95
-
96
-
97
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="EventCallbackable/EventListeners.html" title="Puppeteer::EventCallbackable::EventListeners (class)">EventListeners</a></span>
98
-
99
-
100
- </p>
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
- <h2>
110
- Instance Method Summary
111
- <small><a href="#" class="summary_toggle">collapse</a></small>
112
- </h2>
113
-
114
- <ul class="summary">
115
-
116
- <li class="public ">
117
- <span class="summary_signature">
118
-
119
- <a href="#add_event_listener-instance_method" title="#add_event_listener (instance method)">#<strong>add_event_listener</strong>(event_name, &amp;block) &#x21d2; Object </a>
120
-
121
-
122
-
123
- </span>
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
- <span class="summary_desc"><div class='inline'></div></span>
134
-
135
- </li>
136
-
137
-
138
- <li class="public ">
139
- <span class="summary_signature">
140
-
141
- <a href="#emit_event-instance_method" title="#emit_event (instance method)">#<strong>emit_event</strong>(event_name, *args, **kwargs) &#x21d2; Object </a>
142
-
143
-
144
-
145
- </span>
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
- <span class="summary_desc"><div class='inline'></div></span>
156
-
157
- </li>
158
-
159
-
160
- <li class="public ">
161
- <span class="summary_signature">
162
-
163
- <a href="#on_event-instance_method" title="#on_event (instance method)">#<strong>on_event</strong>(event_name, &amp;block) &#x21d2; Object </a>
164
-
165
-
166
-
167
- </span>
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
- <span class="summary_desc"><div class='inline'></div></span>
178
-
179
- </li>
180
-
181
-
182
- <li class="public ">
183
- <span class="summary_signature">
184
-
185
- <a href="#remove_event_listener-instance_method" title="#remove_event_listener (instance method)">#<strong>remove_event_listener</strong>(*id_args) &#x21d2; Object </a>
186
-
187
-
188
-
189
- </span>
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
- <span class="summary_desc"><div class='inline'></div></span>
200
-
201
- </li>
202
-
203
-
204
- </ul>
205
-
206
-
207
-
208
-
209
- <div id="instance_method_details" class="method_details_list">
210
- <h2>Instance Method Details</h2>
211
-
212
-
213
- <div class="method_details first">
214
- <h3 class="signature first" id="add_event_listener-instance_method">
215
-
216
- #<strong>add_event_listener</strong>(event_name, &amp;block) &#x21d2; <tt>Object</tt>
217
-
218
-
219
-
220
-
221
-
222
- </h3><table class="source_code">
223
- <tr>
224
- <td>
225
- <pre class="lines">
226
-
227
-
228
- 29
229
- 30
230
- 31
231
- 32</pre>
232
- </td>
233
- <td>
234
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 29</span>
235
-
236
- <span class='kw'>def</span> <span class='id identifier rubyid_add_event_listener'>add_event_listener</span><span class='lparen'>(</span><span class='id identifier rubyid_event_name'>event_name</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
237
- <span class='ivar'>@event_listeners</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
238
- <span class='lparen'>(</span><span class='ivar'>@event_listeners</span><span class='lbracket'>[</span><span class='id identifier rubyid_event_name'>event_name</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="EventCallbackable/EventListeners.html" title="Puppeteer::EventCallbackable::EventListeners (class)">EventListeners</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="EventCallbackable/EventListeners.html#initialize-instance_method" title="Puppeteer::EventCallbackable::EventListeners#initialize (method)">new</a></span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
239
- <span class='kw'>end</span></pre>
240
- </td>
241
- </tr>
242
- </table>
243
- </div>
244
-
245
- <div class="method_details ">
246
- <h3 class="signature " id="emit_event-instance_method">
247
-
248
- #<strong>emit_event</strong>(event_name, *args, **kwargs) &#x21d2; <tt>Object</tt>
249
-
250
-
251
-
252
-
253
-
254
- </h3><table class="source_code">
255
- <tr>
256
- <td>
257
- <pre class="lines">
258
-
259
-
260
- 47
261
- 48
262
- 49
263
- 50
264
- 51
265
- 52
266
- 53
267
- 54
268
- 55
269
- 56
270
- 57
271
- 58
272
- 59
273
- 60
274
- 61
275
- 62
276
- 63
277
- 64
278
- 65
279
- 66
280
- 67
281
- 68
282
- 69
283
- 70
284
- 71
285
- 72
286
- 73
287
- 74
288
- 75
289
- 76
290
- 77
291
- 78
292
- 79
293
- 80
294
- 81
295
- 82
296
- 83
297
- 84
298
- 85
299
- 86
300
- 87</pre>
301
- </td>
302
- <td>
303
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 47</span>
304
-
305
- <span class='kw'>def</span> <span class='id identifier rubyid_emit_event'>emit_event</span><span class='lparen'>(</span><span class='id identifier rubyid_event_name'>event_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
306
- <span class='ivar'>@event_callbackable_handlers</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
307
- <span class='ivar'>@event_listeners</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
308
-
309
- <span class='kw'>if</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
310
- <span class='comment'># In Ruby&#39;s specification (version &lt; 2.7),
311
- </span> <span class='comment'># `method(:x).call(*args, **kwargs)` is equivalent to `x(*args, {})`
312
- </span> <span class='comment'># It often causes unexpected ArgumentError.
313
- </span> <span class='comment'>#
314
- </span> <span class='comment'># ----------------
315
- </span> <span class='comment'># def greet
316
- </span> <span class='comment'># puts &#39;Hello!&#39;
317
- </span> <span class='comment'># end
318
- </span> <span class='comment'>#
319
- </span> <span class='comment'># def call_me(*args, **kwargs)
320
- </span> <span class='comment'># greet(*args, **kwargs) # =&gt; &#39;Hello!&#39;
321
- </span> <span class='comment'>#
322
- </span> <span class='comment'># method(:greet).call(*args, **kwargs) # =&gt; `greet&#39;: wrong number of arguments (given 1, expected 0) (ArgumentError)
323
- </span> <span class='comment'># end
324
- </span> <span class='comment'>#
325
- </span> <span class='comment'># call_me
326
- </span> <span class='comment'># ----------------
327
- </span> <span class='comment'>#
328
- </span> <span class='comment'># This behavior is really annoying, and should be avoided, because we often want to set event handler as below:
329
- </span> <span class='comment'>#
330
- </span> <span class='comment'># `on_event &#39;Some.Event.awesome&#39;, &amp;method(:handle_awesome_event)`
331
- </span> <span class='comment'>#
332
- </span> <span class='comment'># So Let&#39;s avoid it by checking kwargs.
333
- </span> <span class='ivar'>@event_callbackable_handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_event_name'>event_name</span><span class='rbracket'>]</span><span class='op'>&amp;.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
334
- <span class='ivar'>@event_listeners</span><span class='lbracket'>[</span><span class='id identifier rubyid_event_name'>event_name</span><span class='rbracket'>]</span><span class='op'>&amp;.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_proc'>proc</span><span class='op'>|</span>
335
- <span class='id identifier rubyid_proc'>proc</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
336
- <span class='kw'>end</span>
337
- <span class='kw'>else</span>
338
- <span class='ivar'>@event_callbackable_handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_event_name'>event_name</span><span class='rbracket'>]</span><span class='op'>&amp;.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
339
- <span class='ivar'>@event_listeners</span><span class='lbracket'>[</span><span class='id identifier rubyid_event_name'>event_name</span><span class='rbracket'>]</span><span class='op'>&amp;.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_proc'>proc</span><span class='op'>|</span>
340
- <span class='id identifier rubyid_proc'>proc</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
341
- <span class='kw'>end</span>
342
- <span class='kw'>end</span>
343
-
344
- <span class='id identifier rubyid_event_name'>event_name</span>
345
- <span class='kw'>end</span></pre>
346
- </td>
347
- </tr>
348
- </table>
349
- </div>
350
-
351
- <div class="method_details ">
352
- <h3 class="signature " id="on_event-instance_method">
353
-
354
- #<strong>on_event</strong>(event_name, &amp;block) &#x21d2; <tt>Object</tt>
355
-
356
-
357
-
358
-
359
-
360
- </h3><table class="source_code">
361
- <tr>
362
- <td>
363
- <pre class="lines">
364
-
365
-
366
- 42
367
- 43
368
- 44
369
- 45</pre>
370
- </td>
371
- <td>
372
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 42</span>
373
-
374
- <span class='kw'>def</span> <span class='id identifier rubyid_on_event'>on_event</span><span class='lparen'>(</span><span class='id identifier rubyid_event_name'>event_name</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
375
- <span class='ivar'>@event_callbackable_handlers</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
376
- <span class='ivar'>@event_callbackable_handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_event_name'>event_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
377
- <span class='kw'>end</span></pre>
378
- </td>
379
- </tr>
380
- </table>
381
- </div>
382
-
383
- <div class="method_details ">
384
- <h3 class="signature " id="remove_event_listener-instance_method">
385
-
386
- #<strong>remove_event_listener</strong>(*id_args) &#x21d2; <tt>Object</tt>
387
-
388
-
389
-
390
-
391
-
392
- </h3><table class="source_code">
393
- <tr>
394
- <td>
395
- <pre class="lines">
396
-
397
-
398
- 34
399
- 35
400
- 36
401
- 37
402
- 38
403
- 39
404
- 40</pre>
405
- </td>
406
- <td>
407
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 34</span>
408
-
409
- <span class='kw'>def</span> <span class='id identifier rubyid_remove_event_listener'>remove_event_listener</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_id_args'>id_args</span><span class='rparen'>)</span>
410
- <span class='lparen'>(</span><span class='ivar'>@event_listeners</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_event_name'>event_name</span><span class='comma'>,</span> <span class='id identifier rubyid_listeners'>listeners</span><span class='op'>|</span>
411
- <span class='id identifier rubyid_id_args'>id_args</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_id'>id</span><span class='op'>|</span>
412
- <span class='id identifier rubyid_listeners'>listeners</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
413
- <span class='kw'>end</span>
414
- <span class='kw'>end</span>
415
- <span class='kw'>end</span></pre>
416
- </td>
417
- </tr>
418
- </table>
419
- </div>
420
-
421
- </div>
422
-
423
- </div>
424
-
425
- <div id="footer">
426
- Generated on Fri Jun 12 12:38:32 2020 by
427
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
428
- 0.9.24 (ruby-2.6.3).
429
- </div>
430
-
431
- </div>
432
- </body>
433
- </html>
@@ -1,435 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: Puppeteer::EventCallbackable::EventListeners
8
-
9
- &mdash; Documentation by YARD 0.9.24
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
-
17
- <script type="text/javascript">
18
- pathId = "Puppeteer::EventCallbackable::EventListeners";
19
- relpath = '../../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../../_index.html">Index (E)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../EventCallbackable.html" title="Puppeteer::EventCallbackable (module)">EventCallbackable</a></span></span>
41
- &raquo;
42
- <span class="title">EventListeners</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Class: Puppeteer::EventCallbackable::EventListeners
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName">Object</span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">Puppeteer::EventCallbackable::EventListeners</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
- <dl>
91
- <dt>Includes:</dt>
92
- <dd>Enumerable</dd>
93
- </dl>
94
-
95
-
96
-
97
-
98
-
99
-
100
- <dl>
101
- <dt>Defined in:</dt>
102
- <dd>lib/puppeteer/event_callbackable.rb</dd>
103
- </dl>
104
-
105
- </div>
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
- <h2>
116
- Instance Method Summary
117
- <small><a href="#" class="summary_toggle">collapse</a></small>
118
- </h2>
119
-
120
- <ul class="summary">
121
-
122
- <li class="public ">
123
- <span class="summary_signature">
124
-
125
- <a href="#add-instance_method" title="#add (instance method)">#<strong>add</strong>(&amp;block) &#x21d2; String </a>
126
-
127
-
128
-
129
- </span>
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
- <span class="summary_desc"><div class='inline'>
140
- <p>Listener ID.</p>
141
- </div></span>
142
-
143
- </li>
144
-
145
-
146
- <li class="public ">
147
- <span class="summary_signature">
148
-
149
- <a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(id) &#x21d2; Object </a>
150
-
151
-
152
-
153
- </span>
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
- <span class="summary_desc"><div class='inline'></div></span>
164
-
165
- </li>
166
-
167
-
168
- <li class="public ">
169
- <span class="summary_signature">
170
-
171
- <a href="#each-instance_method" title="#each (instance method)">#<strong>each</strong>(&amp;block) &#x21d2; Object </a>
172
-
173
-
174
-
175
- </span>
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
- <span class="summary_desc"><div class='inline'></div></span>
186
-
187
- </li>
188
-
189
-
190
- <li class="public ">
191
- <span class="summary_signature">
192
-
193
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; EventListeners </a>
194
-
195
-
196
-
197
- </span>
198
-
199
-
200
- <span class="note title constructor">constructor</span>
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
- <span class="summary_desc"><div class='inline'>
210
- <p>A new instance of EventListeners.</p>
211
- </div></span>
212
-
213
- </li>
214
-
215
-
216
- </ul>
217
-
218
-
219
-
220
- <div id="constructor_details" class="method_details_list">
221
- <h2>Constructor Details</h2>
222
-
223
- <div class="method_details first">
224
- <h3 class="signature first" id="initialize-instance_method">
225
-
226
- #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::EventCallbackable::EventListeners (class)">EventListeners</a></span></tt>
227
-
228
-
229
-
230
-
231
-
232
- </h3><div class="docstring">
233
- <div class="discussion">
234
-
235
- <p>Returns a new instance of EventListeners.</p>
236
-
237
-
238
- </div>
239
- </div>
240
- <div class="tags">
241
-
242
-
243
- </div><table class="source_code">
244
- <tr>
245
- <td>
246
- <pre class="lines">
247
-
248
-
249
- 7
250
- 8
251
- 9</pre>
252
- </td>
253
- <td>
254
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 7</span>
255
-
256
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
257
- <span class='ivar'>@listeners</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
258
- <span class='kw'>end</span></pre>
259
- </td>
260
- </tr>
261
- </table>
262
- </div>
263
-
264
- </div>
265
-
266
-
267
- <div id="instance_method_details" class="method_details_list">
268
- <h2>Instance Method Details</h2>
269
-
270
-
271
- <div class="method_details first">
272
- <h3 class="signature first" id="add-instance_method">
273
-
274
- #<strong>add</strong>(&amp;block) &#x21d2; <tt>String</tt>
275
-
276
-
277
-
278
-
279
-
280
- </h3><div class="docstring">
281
- <div class="discussion">
282
-
283
- <p>Returns Listener ID.</p>
284
-
285
-
286
- </div>
287
- </div>
288
- <div class="tags">
289
-
290
- <p class="tag_title">Returns:</p>
291
- <ul class="return">
292
-
293
- <li>
294
-
295
-
296
- <span class='type'>(<tt>String</tt>)</span>
297
-
298
-
299
-
300
- &mdash;
301
- <div class='inline'>
302
- <p>Listener ID</p>
303
- </div>
304
-
305
- </li>
306
-
307
- </ul>
308
-
309
- </div><table class="source_code">
310
- <tr>
311
- <td>
312
- <pre class="lines">
313
-
314
-
315
- 12
316
- 13
317
- 14
318
- 15
319
- 16</pre>
320
- </td>
321
- <td>
322
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 12</span>
323
-
324
- <span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
325
- <span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='const'>SecureRandom</span><span class='period'>.</span><span class='id identifier rubyid_hex'>hex</span><span class='lparen'>(</span><span class='int'>8</span><span class='rparen'>)</span>
326
- <span class='ivar'>@listeners</span><span class='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
327
- <span class='id identifier rubyid_id'>id</span>
328
- <span class='kw'>end</span></pre>
329
- </td>
330
- </tr>
331
- </table>
332
- </div>
333
-
334
- <div class="method_details ">
335
- <h3 class="signature " id="delete-instance_method">
336
-
337
- #<strong>delete</strong>(id) &#x21d2; <tt>Object</tt>
338
-
339
-
340
-
341
-
342
-
343
- </h3><div class="docstring">
344
- <div class="discussion">
345
-
346
-
347
- </div>
348
- </div>
349
- <div class="tags">
350
- <p class="tag_title">Parameters:</p>
351
- <ul class="param">
352
-
353
- <li>
354
-
355
- <span class='name'>id</span>
356
-
357
-
358
- <span class='type'>(<tt>String</tt>)</span>
359
-
360
-
361
-
362
- &mdash;
363
- <div class='inline'>
364
- <p>Listener ID returned on #add</p>
365
- </div>
366
-
367
- </li>
368
-
369
- </ul>
370
-
371
-
372
- </div><table class="source_code">
373
- <tr>
374
- <td>
375
- <pre class="lines">
376
-
377
-
378
- 19
379
- 20
380
- 21</pre>
381
- </td>
382
- <td>
383
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 19</span>
384
-
385
- <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
386
- <span class='ivar'>@listeners</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
387
- <span class='kw'>end</span></pre>
388
- </td>
389
- </tr>
390
- </table>
391
- </div>
392
-
393
- <div class="method_details ">
394
- <h3 class="signature " id="each-instance_method">
395
-
396
- #<strong>each</strong>(&amp;block) &#x21d2; <tt>Object</tt>
397
-
398
-
399
-
400
-
401
-
402
- </h3><table class="source_code">
403
- <tr>
404
- <td>
405
- <pre class="lines">
406
-
407
-
408
- 24
409
- 25
410
- 26</pre>
411
- </td>
412
- <td>
413
- <pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 24</span>
414
-
415
- <span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
416
- <span class='ivar'>@listeners</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
417
- <span class='kw'>end</span></pre>
418
- </td>
419
- </tr>
420
- </table>
421
- </div>
422
-
423
- </div>
424
-
425
- </div>
426
-
427
- <div id="footer">
428
- Generated on Fri Jun 12 12:38:35 2020 by
429
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
430
- 0.9.24 (ruby-2.6.3).
431
- </div>
432
-
433
- </div>
434
- </body>
435
- </html>