puppeteer-ruby 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +30 -0
  3. data/.rubocop.yml +4 -5
  4. data/docs/Puppeteer.html +2010 -0
  5. data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
  6. data/docs/Puppeteer/Browser.html +2150 -0
  7. data/docs/Puppeteer/BrowserContext.html +809 -0
  8. data/docs/Puppeteer/BrowserFetcher.html +214 -0
  9. data/docs/Puppeteer/BrowserRunner.html +914 -0
  10. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
  11. data/docs/Puppeteer/CDPSession.html +784 -0
  12. data/docs/Puppeteer/CDPSession/Error.html +124 -0
  13. data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
  14. data/docs/Puppeteer/Connection.html +960 -0
  15. data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
  16. data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
  17. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
  18. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
  19. data/docs/Puppeteer/ConsoleMessage.html +565 -0
  20. data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
  21. data/docs/Puppeteer/DOMWorld.html +1580 -0
  22. data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
  23. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
  24. data/docs/Puppeteer/DebugPrint.html +233 -0
  25. data/docs/Puppeteer/Device.html +470 -0
  26. data/docs/Puppeteer/Devices.html +139 -0
  27. data/docs/Puppeteer/ElementHandle.html +1603 -0
  28. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
  29. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
  30. data/docs/Puppeteer/ElementHandle/Point.html +481 -0
  31. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
  32. data/docs/Puppeteer/EmulationManager.html +454 -0
  33. data/docs/Puppeteer/EventCallbackable.html +433 -0
  34. data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
  35. data/docs/Puppeteer/ExecutionContext.html +772 -0
  36. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
  37. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
  38. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
  39. data/docs/Puppeteer/Frame.html +3625 -0
  40. data/docs/Puppeteer/FrameManager.html +2414 -0
  41. data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
  42. data/docs/Puppeteer/IfPresent.html +222 -0
  43. data/docs/Puppeteer/JSHandle.html +1352 -0
  44. data/docs/Puppeteer/Keyboard.html +1557 -0
  45. data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
  46. data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
  47. data/docs/Puppeteer/Launcher.html +237 -0
  48. data/docs/Puppeteer/Launcher/Base.html +385 -0
  49. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
  50. data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
  51. data/docs/Puppeteer/Launcher/Chrome.html +628 -0
  52. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
  53. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
  54. data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
  55. data/docs/Puppeteer/LifecycleWatcher.html +834 -0
  56. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
  57. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
  58. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
  59. data/docs/Puppeteer/Mouse.html +1105 -0
  60. data/docs/Puppeteer/Mouse/Button.html +136 -0
  61. data/docs/Puppeteer/NetworkManager.html +901 -0
  62. data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
  63. data/docs/Puppeteer/Page.html +5426 -0
  64. data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
  65. data/docs/Puppeteer/Page/ScriptTag.html +555 -0
  66. data/docs/Puppeteer/Page/StyleTag.html +448 -0
  67. data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
  68. data/docs/Puppeteer/RemoteObject.html +951 -0
  69. data/docs/Puppeteer/Target.html +1384 -0
  70. data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
  71. data/docs/Puppeteer/Target/TargetInfo.html +729 -0
  72. data/docs/Puppeteer/TimeoutError.html +135 -0
  73. data/docs/Puppeteer/TimeoutSettings.html +496 -0
  74. data/docs/Puppeteer/TouchScreen.html +464 -0
  75. data/docs/Puppeteer/Viewport.html +757 -0
  76. data/docs/Puppeteer/WaitTask.html +211 -0
  77. data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
  78. data/docs/Puppeteer/WebSocket.html +673 -0
  79. data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
  80. data/docs/Puppeteer/WebSocketTransport.html +600 -0
  81. data/docs/Puppeteer/WebSocktTransportError.html +124 -0
  82. data/docs/_index.html +788 -0
  83. data/docs/class_list.html +51 -0
  84. data/docs/css/common.css +1 -0
  85. data/docs/css/full_list.css +58 -0
  86. data/docs/css/style.css +496 -0
  87. data/docs/file.README.html +121 -0
  88. data/docs/file_list.html +56 -0
  89. data/docs/frames.html +17 -0
  90. data/docs/index.html +121 -0
  91. data/docs/js/app.js +314 -0
  92. data/docs/js/full_list.js +216 -0
  93. data/docs/js/jquery.js +4 -0
  94. data/docs/method_list.html +3747 -0
  95. data/docs/top-level-namespace.html +126 -0
  96. data/lib/puppeteer.rb +9 -7
  97. data/lib/puppeteer/async_await_behavior.rb +6 -0
  98. data/lib/puppeteer/browser.rb +21 -1
  99. data/lib/puppeteer/connection.rb +1 -1
  100. data/lib/puppeteer/dom_world.rb +15 -2
  101. data/lib/puppeteer/element_handle.rb +3 -2
  102. data/lib/puppeteer/frame.rb +4 -0
  103. data/lib/puppeteer/frame_manager.rb +1 -1
  104. data/lib/puppeteer/js_handle.rb +3 -2
  105. data/lib/puppeteer/launcher.rb +0 -1
  106. data/lib/puppeteer/lifecycle_watcher.rb +3 -3
  107. data/lib/puppeteer/page.rb +6 -4
  108. data/lib/puppeteer/version.rb +1 -1
  109. data/puppeteer-ruby.gemspec +4 -1
  110. metadata +138 -4
@@ -0,0 +1,211 @@
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::WaitTask
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::WaitTask";
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 (W)</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">WaitTask</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::WaitTask
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::WaitTask</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/puppeteer/wait_task.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Defined Under Namespace</h2>
103
+ <p class="children">
104
+
105
+
106
+
107
+
108
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="WaitTask/TerminatedError.html" title="Puppeteer::WaitTask::TerminatedError (class)">TerminatedError</a></span>
109
+
110
+
111
+ </p>
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+ <h2>
121
+ Instance Method Summary
122
+ <small><a href="#" class="summary_toggle">collapse</a></small>
123
+ </h2>
124
+
125
+ <ul class="summary">
126
+
127
+ <li class="public ">
128
+ <span class="summary_signature">
129
+
130
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; WaitTask </a>
131
+
132
+
133
+
134
+ </span>
135
+
136
+
137
+ <span class="note title constructor">constructor</span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="summary_desc"><div class='inline'>
147
+ <p>A new instance of WaitTask.</p>
148
+ </div></span>
149
+
150
+ </li>
151
+
152
+
153
+ </ul>
154
+
155
+
156
+ <div id="constructor_details" class="method_details_list">
157
+ <h2>Constructor Details</h2>
158
+
159
+ <div class="method_details first">
160
+ <h3 class="signature first" id="initialize-instance_method">
161
+
162
+ #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::WaitTask (class)">WaitTask</a></span></tt>
163
+
164
+
165
+
166
+
167
+
168
+ </h3><div class="docstring">
169
+ <div class="discussion">
170
+
171
+ <p>Returns a new instance of WaitTask.</p>
172
+
173
+
174
+ </div>
175
+ </div>
176
+ <div class="tags">
177
+
178
+
179
+ </div><table class="source_code">
180
+ <tr>
181
+ <td>
182
+ <pre class="lines">
183
+
184
+
185
+ 4
186
+ 5</pre>
187
+ </td>
188
+ <td>
189
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/wait_task.rb', line 4</span>
190
+
191
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
192
+ <span class='kw'>end</span></pre>
193
+ </td>
194
+ </tr>
195
+ </table>
196
+ </div>
197
+
198
+ </div>
199
+
200
+
201
+ </div>
202
+
203
+ <div id="footer">
204
+ Generated on Sun Apr 26 15:52:57 2020 by
205
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
206
+ 0.9.24 (ruby-2.6.3).
207
+ </div>
208
+
209
+ </div>
210
+ </body>
211
+ </html>
@@ -0,0 +1,124 @@
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
+ Exception: Puppeteer::WaitTask::TerminatedError
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::WaitTask::TerminatedError";
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 (T)</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="../WaitTask.html" title="Puppeteer::WaitTask (class)">WaitTask</a></span></span>
41
+ &raquo;
42
+ <span class="title">TerminatedError</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>Exception: Puppeteer::WaitTask::TerminatedError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">StandardError</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next">Puppeteer::WaitTask::TerminatedError</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/puppeteer/wait_task.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ </div>
115
+
116
+ <div id="footer">
117
+ Generated on Sun Apr 26 15:52:57 2020 by
118
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
+ 0.9.24 (ruby-2.6.3).
120
+ </div>
121
+
122
+ </div>
123
+ </body>
124
+ </html>
@@ -0,0 +1,673 @@
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::WebSocket
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::WebSocket";
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 (W)</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">WebSocket</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::WebSocket
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::WebSocket</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/puppeteer/web_socket.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>ref: <a href="https://github.com/rails/rails/blob/master/actioncable/lib/action_cable/connection/client_socket.rb">github.com/rails/rails/blob/master/actioncable/lib/action_cable/connection/client_socket.rb</a> ref: <a href="https://github.com/cavalle/chrome_remote/blob/master/lib/chrome_remote/web_socket_client.rb">github.com/cavalle/chrome_remote/blob/master/lib/chrome_remote/web_socket_client.rb</a></p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div><h2>Defined Under Namespace</h2>
114
+ <p class="children">
115
+
116
+
117
+
118
+
119
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="WebSocket/DriverImpl.html" title="Puppeteer::WebSocket::DriverImpl (class)">DriverImpl</a></span>
120
+
121
+
122
+ </p>
123
+
124
+
125
+ <h2>
126
+ Constant Summary
127
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
128
+ </h2>
129
+
130
+ <dl class="constants">
131
+
132
+ <dt id="STATE_CONNECTING-constant" class="">STATE_CONNECTING =
133
+
134
+ </dt>
135
+ <dd><pre class="code"><span class='int'>0</span></pre></dd>
136
+
137
+ <dt id="STATE_OPENED-constant" class="">STATE_OPENED =
138
+
139
+ </dt>
140
+ <dd><pre class="code"><span class='int'>1</span></pre></dd>
141
+
142
+ <dt id="STATE_CLOSING-constant" class="">STATE_CLOSING =
143
+
144
+ </dt>
145
+ <dd><pre class="code"><span class='int'>2</span></pre></dd>
146
+
147
+ <dt id="STATE_CLOSED-constant" class="">STATE_CLOSED =
148
+
149
+ </dt>
150
+ <dd><pre class="code"><span class='int'>3</span></pre></dd>
151
+
152
+ </dl>
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ <h2>
163
+ Instance Method Summary
164
+ <small><a href="#" class="summary_toggle">collapse</a></small>
165
+ </h2>
166
+
167
+ <ul class="summary">
168
+
169
+ <li class="public ">
170
+ <span class="summary_signature">
171
+
172
+ <a href="#close-instance_method" title="#close (instance method)">#<strong>close</strong>(code: 1000, reason: &quot;&quot;) &#x21d2; Object </a>
173
+
174
+
175
+
176
+ </span>
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+ <span class="summary_desc"><div class='inline'></div></span>
187
+
188
+ </li>
189
+
190
+
191
+ <li class="public ">
192
+ <span class="summary_signature">
193
+
194
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(url:, max_payload_size:) &#x21d2; WebSocket </a>
195
+
196
+
197
+
198
+ </span>
199
+
200
+
201
+ <span class="note title constructor">constructor</span>
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+ <span class="summary_desc"><div class='inline'>
211
+ <p>A new instance of WebSocket.</p>
212
+ </div></span>
213
+
214
+ </li>
215
+
216
+
217
+ <li class="public ">
218
+ <span class="summary_signature">
219
+
220
+ <a href="#on_close-instance_method" title="#on_close (instance method)">#<strong>on_close</strong>(&amp;block) &#x21d2; Object </a>
221
+
222
+
223
+
224
+ </span>
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+ <span class="summary_desc"><div class='inline'></div></span>
235
+
236
+ </li>
237
+
238
+
239
+ <li class="public ">
240
+ <span class="summary_signature">
241
+
242
+ <a href="#on_error-instance_method" title="#on_error (instance method)">#<strong>on_error</strong>(&amp;block) &#x21d2; Object </a>
243
+
244
+
245
+
246
+ </span>
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+ <span class="summary_desc"><div class='inline'></div></span>
257
+
258
+ </li>
259
+
260
+
261
+ <li class="public ">
262
+ <span class="summary_signature">
263
+
264
+ <a href="#on_message-instance_method" title="#on_message (instance method)">#<strong>on_message</strong>(&amp;block) &#x21d2; Object </a>
265
+
266
+
267
+
268
+ </span>
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+ <span class="summary_desc"><div class='inline'></div></span>
279
+
280
+ </li>
281
+
282
+
283
+ <li class="public ">
284
+ <span class="summary_signature">
285
+
286
+ <a href="#on_open-instance_method" title="#on_open (instance method)">#<strong>on_open</strong>(&amp;block) &#x21d2; Object </a>
287
+
288
+
289
+
290
+ </span>
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+ <span class="summary_desc"><div class='inline'></div></span>
301
+
302
+ </li>
303
+
304
+
305
+ <li class="public ">
306
+ <span class="summary_signature">
307
+
308
+ <a href="#send_text-instance_method" title="#send_text (instance method)">#<strong>send_text</strong>(message) &#x21d2; Object </a>
309
+
310
+
311
+
312
+ </span>
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+ <span class="summary_desc"><div class='inline'></div></span>
323
+
324
+ </li>
325
+
326
+
327
+ </ul>
328
+
329
+
330
+ <div id="constructor_details" class="method_details_list">
331
+ <h2>Constructor Details</h2>
332
+
333
+ <div class="method_details first">
334
+ <h3 class="signature first" id="initialize-instance_method">
335
+
336
+ #<strong>initialize</strong>(url:, max_payload_size:) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::WebSocket (class)">WebSocket</a></span></tt>
337
+
338
+
339
+
340
+
341
+
342
+ </h3><div class="docstring">
343
+ <div class="discussion">
344
+
345
+ <p>Returns a new instance of WebSocket.</p>
346
+
347
+
348
+ </div>
349
+ </div>
350
+ <div class="tags">
351
+
352
+
353
+ </div><table class="source_code">
354
+ <tr>
355
+ <td>
356
+ <pre class="lines">
357
+
358
+
359
+ 31
360
+ 32
361
+ 33
362
+ 34
363
+ 35
364
+ 36
365
+ 37
366
+ 38
367
+ 39
368
+ 40
369
+ 41
370
+ 42
371
+ 43
372
+ 44</pre>
373
+ </td>
374
+ <td>
375
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 31</span>
376
+
377
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>url:</span><span class='comma'>,</span> <span class='label'>max_payload_size:</span><span class='rparen'>)</span>
378
+ <span class='ivar'>@impl</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="WebSocket/DriverImpl.html" title="Puppeteer::WebSocket::DriverImpl (class)">DriverImpl</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="WebSocket/DriverImpl.html#initialize-instance_method" title="Puppeteer::WebSocket::DriverImpl#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
379
+ <span class='ivar'>@driver</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>WebSocket</span><span class='op'>::</span><span class='const'>Driver</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span><span class='lparen'>(</span><span class='ivar'>@impl</span><span class='comma'>,</span> <span class='label'>max_length:</span> <span class='id identifier rubyid_max_payload_size'>max_payload_size</span><span class='rparen'>)</span>
380
+
381
+ <span class='id identifier rubyid_setup'>setup</span>
382
+ <span class='ivar'>@driver</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span>
383
+
384
+ <span class='const'>Thread</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span>
385
+ <span class='id identifier rubyid_wait_for_data'>wait_for_data</span> <span class='kw'>until</span> <span class='ivar'>@ready_state</span> <span class='op'>&gt;=</span> <span class='const'><span class='object_link'><a href="#STATE_CLOSING-constant" title="Puppeteer::WebSocket::STATE_CLOSING (constant)">STATE_CLOSING</a></span></span>
386
+ <span class='kw'>rescue</span> <span class='const'>EOFError</span>
387
+ <span class='comment'># Google Chrome was gone.
388
+ </span> <span class='comment'># We have nothing todo. Just finish polling.
389
+ </span> <span class='kw'>end</span>
390
+ <span class='kw'>end</span></pre>
391
+ </td>
392
+ </tr>
393
+ </table>
394
+ </div>
395
+
396
+ </div>
397
+
398
+
399
+ <div id="instance_method_details" class="method_details_list">
400
+ <h2>Instance Method Details</h2>
401
+
402
+
403
+ <div class="method_details first">
404
+ <h3 class="signature first" id="close-instance_method">
405
+
406
+ #<strong>close</strong>(code: 1000, reason: &quot;&quot;) &#x21d2; <tt>Object</tt>
407
+
408
+
409
+
410
+
411
+
412
+ </h3><table class="source_code">
413
+ <tr>
414
+ <td>
415
+ <pre class="lines">
416
+
417
+
418
+ 76
419
+ 77
420
+ 78
421
+ 79
422
+ 80</pre>
423
+ </td>
424
+ <td>
425
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 76</span>
426
+
427
+ <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span><span class='lparen'>(</span><span class='label'>code:</span> <span class='int'>1000</span><span class='comma'>,</span> <span class='label'>reason:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
428
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='ivar'>@ready_state</span> <span class='op'>&gt;=</span> <span class='const'><span class='object_link'><a href="#STATE_CLOSING-constant" title="Puppeteer::WebSocket::STATE_CLOSING (constant)">STATE_CLOSING</a></span></span>
429
+ <span class='ivar'>@ready_state</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#STATE_CLOSING-constant" title="Puppeteer::WebSocket::STATE_CLOSING (constant)">STATE_CLOSING</a></span></span>
430
+ <span class='ivar'>@driver</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span><span class='lparen'>(</span><span class='id identifier rubyid_reason'>reason</span><span class='comma'>,</span> <span class='id identifier rubyid_code'>code</span><span class='rparen'>)</span>
431
+ <span class='kw'>end</span></pre>
432
+ </td>
433
+ </tr>
434
+ </table>
435
+ </div>
436
+
437
+ <div class="method_details ">
438
+ <h3 class="signature " id="on_close-instance_method">
439
+
440
+ #<strong>on_close</strong>(&amp;block) &#x21d2; <tt>Object</tt>
441
+
442
+
443
+
444
+
445
+
446
+ </h3><div class="docstring">
447
+ <div class="discussion">
448
+
449
+
450
+ </div>
451
+ </div>
452
+ <div class="tags">
453
+ <p class="tag_title">Parameters:</p>
454
+ <ul class="param">
455
+
456
+ <li>
457
+
458
+ <span class='name'>block</span>
459
+
460
+
461
+ <span class='type'>(<tt>Proc(reason: String, code: Numeric)</tt>)</span>
462
+
463
+
464
+
465
+ </li>
466
+
467
+ </ul>
468
+
469
+
470
+ </div><table class="source_code">
471
+ <tr>
472
+ <td>
473
+ <pre class="lines">
474
+
475
+
476
+ 87
477
+ 88
478
+ 89</pre>
479
+ </td>
480
+ <td>
481
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 87</span>
482
+
483
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_close'>on_close</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
484
+ <span class='ivar'>@on_close</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
485
+ <span class='kw'>end</span></pre>
486
+ </td>
487
+ </tr>
488
+ </table>
489
+ </div>
490
+
491
+ <div class="method_details ">
492
+ <h3 class="signature " id="on_error-instance_method">
493
+
494
+ #<strong>on_error</strong>(&amp;block) &#x21d2; <tt>Object</tt>
495
+
496
+
497
+
498
+
499
+
500
+ </h3><div class="docstring">
501
+ <div class="discussion">
502
+
503
+
504
+ </div>
505
+ </div>
506
+ <div class="tags">
507
+ <p class="tag_title">Parameters:</p>
508
+ <ul class="param">
509
+
510
+ <li>
511
+
512
+ <span class='name'>block</span>
513
+
514
+
515
+ <span class='type'>(<tt>Proc(error_message: String)</tt>)</span>
516
+
517
+
518
+
519
+ </li>
520
+
521
+ </ul>
522
+
523
+
524
+ </div><table class="source_code">
525
+ <tr>
526
+ <td>
527
+ <pre class="lines">
528
+
529
+
530
+ 92
531
+ 93
532
+ 94</pre>
533
+ </td>
534
+ <td>
535
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 92</span>
536
+
537
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_error'>on_error</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
538
+ <span class='ivar'>@on_error</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
539
+ <span class='kw'>end</span></pre>
540
+ </td>
541
+ </tr>
542
+ </table>
543
+ </div>
544
+
545
+ <div class="method_details ">
546
+ <h3 class="signature " id="on_message-instance_method">
547
+
548
+ #<strong>on_message</strong>(&amp;block) &#x21d2; <tt>Object</tt>
549
+
550
+
551
+
552
+
553
+
554
+ </h3><table class="source_code">
555
+ <tr>
556
+ <td>
557
+ <pre class="lines">
558
+
559
+
560
+ 96
561
+ 97
562
+ 98</pre>
563
+ </td>
564
+ <td>
565
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 96</span>
566
+
567
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_message'>on_message</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
568
+ <span class='ivar'>@on_message</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
569
+ <span class='kw'>end</span></pre>
570
+ </td>
571
+ </tr>
572
+ </table>
573
+ </div>
574
+
575
+ <div class="method_details ">
576
+ <h3 class="signature " id="on_open-instance_method">
577
+
578
+ #<strong>on_open</strong>(&amp;block) &#x21d2; <tt>Object</tt>
579
+
580
+
581
+
582
+
583
+
584
+ </h3><table class="source_code">
585
+ <tr>
586
+ <td>
587
+ <pre class="lines">
588
+
589
+
590
+ 82
591
+ 83
592
+ 84</pre>
593
+ </td>
594
+ <td>
595
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 82</span>
596
+
597
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_open'>on_open</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
598
+ <span class='ivar'>@on_open</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
599
+ <span class='kw'>end</span></pre>
600
+ </td>
601
+ </tr>
602
+ </table>
603
+ </div>
604
+
605
+ <div class="method_details ">
606
+ <h3 class="signature " id="send_text-instance_method">
607
+
608
+ #<strong>send_text</strong>(message) &#x21d2; <tt>Object</tt>
609
+
610
+
611
+
612
+
613
+
614
+ </h3><div class="docstring">
615
+ <div class="discussion">
616
+
617
+
618
+ </div>
619
+ </div>
620
+ <div class="tags">
621
+ <p class="tag_title">Parameters:</p>
622
+ <ul class="param">
623
+
624
+ <li>
625
+
626
+ <span class='name'>message</span>
627
+
628
+
629
+ <span class='type'>(<tt>String</tt>)</span>
630
+
631
+
632
+
633
+ </li>
634
+
635
+ </ul>
636
+
637
+
638
+ </div><table class="source_code">
639
+ <tr>
640
+ <td>
641
+ <pre class="lines">
642
+
643
+
644
+ 71
645
+ 72
646
+ 73
647
+ 74</pre>
648
+ </td>
649
+ <td>
650
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 71</span>
651
+
652
+ <span class='kw'>def</span> <span class='id identifier rubyid_send_text'>send_text</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
653
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='ivar'>@ready_state</span> <span class='op'>&gt;=</span> <span class='const'><span class='object_link'><a href="#STATE_CLOSING-constant" title="Puppeteer::WebSocket::STATE_CLOSING (constant)">STATE_CLOSING</a></span></span>
654
+ <span class='ivar'>@driver</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
655
+ <span class='kw'>end</span></pre>
656
+ </td>
657
+ </tr>
658
+ </table>
659
+ </div>
660
+
661
+ </div>
662
+
663
+ </div>
664
+
665
+ <div id="footer">
666
+ Generated on Sun Apr 26 15:52:57 2020 by
667
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
668
+ 0.9.24 (ruby-2.6.3).
669
+ </div>
670
+
671
+ </div>
672
+ </body>
673
+ </html>