puppeteer-ruby 0.0.12 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -14
- data/.github/workflows/docs.yml +45 -0
- data/.github/workflows/reviewdog.yml +15 -0
- data/README.md +52 -1
- data/lib/puppeteer.rb +10 -2
- data/lib/puppeteer/browser.rb +53 -34
- data/lib/puppeteer/browser_context.rb +35 -5
- data/lib/puppeteer/cdp_session.rb +3 -19
- data/lib/puppeteer/concurrent_ruby_utils.rb +6 -0
- data/lib/puppeteer/connection.rb +9 -16
- data/lib/puppeteer/debug_print.rb +1 -1
- data/lib/puppeteer/define_async_method.rb +23 -0
- data/lib/puppeteer/dom_world.rb +67 -78
- data/lib/puppeteer/element_handle.rb +19 -47
- data/lib/puppeteer/emulation_manager.rb +2 -6
- data/lib/puppeteer/env.rb +18 -0
- data/lib/puppeteer/execution_context.rb +1 -6
- data/lib/puppeteer/frame.rb +34 -39
- data/lib/puppeteer/frame_manager.rb +7 -25
- data/lib/puppeteer/js_handle.rb +3 -12
- data/lib/puppeteer/keyboard.rb +9 -29
- data/lib/puppeteer/launcher/chrome.rb +9 -7
- data/lib/puppeteer/mouse.rb +20 -24
- data/lib/puppeteer/network_manager.rb +163 -5
- data/lib/puppeteer/page.rb +213 -179
- data/lib/puppeteer/page/pdf_options.rb +166 -0
- data/lib/puppeteer/remote_object.rb +2 -5
- data/lib/puppeteer/request.rb +330 -0
- data/lib/puppeteer/response.rb +113 -0
- data/lib/puppeteer/touch_screen.rb +2 -7
- data/lib/puppeteer/version.rb +1 -1
- data/lib/puppeteer/wait_task.rb +2 -4
- data/lib/puppeteer/web_socket.rb +7 -0
- data/puppeteer-ruby.gemspec +2 -1
- metadata +25 -103
- data/docs/Puppeteer.html +0 -2338
- data/docs/Puppeteer/AsyncAwaitBehavior.html +0 -105
- data/docs/Puppeteer/Browser.html +0 -2258
- data/docs/Puppeteer/BrowserContext.html +0 -809
- data/docs/Puppeteer/BrowserFetcher.html +0 -214
- data/docs/Puppeteer/BrowserRunner.html +0 -914
- data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +0 -477
- data/docs/Puppeteer/CDPSession.html +0 -813
- data/docs/Puppeteer/CDPSession/Error.html +0 -124
- data/docs/Puppeteer/ConcurrentRubyUtils.html +0 -438
- data/docs/Puppeteer/Connection.html +0 -964
- data/docs/Puppeteer/Connection/MessageCallback.html +0 -434
- data/docs/Puppeteer/Connection/ProtocolError.html +0 -216
- data/docs/Puppeteer/Connection/RequestDebugPrinter.html +0 -217
- data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +0 -244
- data/docs/Puppeteer/ConsoleMessage.html +0 -565
- data/docs/Puppeteer/ConsoleMessage/Location.html +0 -433
- data/docs/Puppeteer/DOMWorld.html +0 -2219
- data/docs/Puppeteer/DOMWorld/DetachedError.html +0 -124
- data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +0 -124
- data/docs/Puppeteer/DebugPrint.html +0 -233
- data/docs/Puppeteer/Device.html +0 -470
- data/docs/Puppeteer/Devices.html +0 -139
- data/docs/Puppeteer/ElementHandle.html +0 -2542
- data/docs/Puppeteer/ElementHandle/BoundingBox.html +0 -507
- data/docs/Puppeteer/ElementHandle/BoxModel.html +0 -404
- data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +0 -206
- data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +0 -206
- data/docs/Puppeteer/ElementHandle/Point.html +0 -492
- data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +0 -124
- data/docs/Puppeteer/EmulationManager.html +0 -454
- data/docs/Puppeteer/EventCallbackable.html +0 -499
- data/docs/Puppeteer/EventCallbackable/EventListeners.html +0 -435
- data/docs/Puppeteer/ExecutionContext.html +0 -998
- data/docs/Puppeteer/ExecutionContext/EvaluationError.html +0 -124
- data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +0 -357
- data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +0 -389
- data/docs/Puppeteer/FileChooser.html +0 -455
- data/docs/Puppeteer/Frame.html +0 -3813
- data/docs/Puppeteer/FrameManager.html +0 -2410
- data/docs/Puppeteer/FrameManager/NavigationError.html +0 -124
- data/docs/Puppeteer/IfPresent.html +0 -222
- data/docs/Puppeteer/JSHandle.html +0 -1352
- data/docs/Puppeteer/Keyboard.html +0 -1557
- data/docs/Puppeteer/Keyboard/KeyDefinition.html +0 -831
- data/docs/Puppeteer/Keyboard/KeyDescription.html +0 -603
- data/docs/Puppeteer/Launcher.html +0 -237
- data/docs/Puppeteer/Launcher/Base.html +0 -385
- data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +0 -124
- data/docs/Puppeteer/Launcher/BrowserOptions.html +0 -441
- data/docs/Puppeteer/Launcher/Chrome.html +0 -669
- data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +0 -382
- data/docs/Puppeteer/Launcher/ChromeArgOptions.html +0 -531
- data/docs/Puppeteer/Launcher/LaunchOptions.html +0 -893
- data/docs/Puppeteer/LifecycleWatcher.html +0 -834
- data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +0 -363
- data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +0 -206
- data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +0 -124
- data/docs/Puppeteer/Mouse.html +0 -1095
- data/docs/Puppeteer/Mouse/Button.html +0 -136
- data/docs/Puppeteer/NetworkManager.html +0 -901
- data/docs/Puppeteer/NetworkManager/Credentials.html +0 -385
- data/docs/Puppeteer/Page.html +0 -6173
- data/docs/Puppeteer/Page/FileChooserTimeoutError.html +0 -206
- data/docs/Puppeteer/Page/ScreenshotOptions.html +0 -845
- data/docs/Puppeteer/Page/ScriptTag.html +0 -555
- data/docs/Puppeteer/Page/StyleTag.html +0 -448
- data/docs/Puppeteer/Page/TargetCrashedError.html +0 -124
- data/docs/Puppeteer/RemoteObject.html +0 -1087
- data/docs/Puppeteer/Target.html +0 -1336
- data/docs/Puppeteer/Target/InitializeFailure.html +0 -124
- data/docs/Puppeteer/Target/TargetInfo.html +0 -729
- data/docs/Puppeteer/TimeoutError.html +0 -135
- data/docs/Puppeteer/TimeoutSettings.html +0 -496
- data/docs/Puppeteer/TouchScreen.html +0 -464
- data/docs/Puppeteer/Viewport.html +0 -837
- data/docs/Puppeteer/WaitTask.html +0 -637
- data/docs/Puppeteer/WaitTask/TerminatedError.html +0 -124
- data/docs/Puppeteer/WaitTask/TimeoutError.html +0 -206
- data/docs/Puppeteer/WebSocket.html +0 -673
- data/docs/Puppeteer/WebSocket/DriverImpl.html +0 -412
- data/docs/Puppeteer/WebSocket/TransportError.html +0 -124
- data/docs/Puppeteer/WebSocketTransport.html +0 -600
- data/docs/Puppeteer/WebSocktTransportError.html +0 -124
- data/docs/_index.html +0 -816
- data/docs/class_list.html +0 -51
- data/docs/css/common.css +0 -1
- data/docs/css/full_list.css +0 -58
- data/docs/css/style.css +0 -496
- data/docs/file.README.html +0 -125
- data/docs/file_list.html +0 -56
- data/docs/frames.html +0 -17
- data/docs/index.html +0 -125
- data/docs/js/app.js +0 -314
- data/docs/js/full_list.js +0 -216
- data/docs/js/jquery.js +0 -4
- data/docs/method_list.html +0 -4115
- data/docs/top-level-namespace.html +0 -126
- data/lib/puppeteer/async_await_behavior.rb +0 -38
@@ -1,837 +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::Viewport
|
8
|
-
|
9
|
-
— 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::Viewport";
|
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 (V)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Viewport</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::Viewport
|
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::Viewport</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/viewport.rb</dd>
|
98
|
-
</dl>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
107
|
-
<ul class="summary">
|
108
|
-
|
109
|
-
<li class="public ">
|
110
|
-
<span class="summary_signature">
|
111
|
-
|
112
|
-
<a href="#device_scale_factor-instance_method" title="#device_scale_factor (instance method)">#<strong>device_scale_factor</strong> ⇒ Object </a>
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
</span>
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
<span class="note title readonly">readonly</span>
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
<span class="summary_desc"><div class='inline'>
|
132
|
-
<p>Returns the value of attribute device_scale_factor.</p>
|
133
|
-
</div></span>
|
134
|
-
|
135
|
-
</li>
|
136
|
-
|
137
|
-
|
138
|
-
<li class="public ">
|
139
|
-
<span class="summary_signature">
|
140
|
-
|
141
|
-
<a href="#height-instance_method" title="#height (instance method)">#<strong>height</strong> ⇒ Object </a>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
</span>
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
<span class="note title readonly">readonly</span>
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
<span class="summary_desc"><div class='inline'>
|
161
|
-
<p>Returns the value of attribute height.</p>
|
162
|
-
</div></span>
|
163
|
-
|
164
|
-
</li>
|
165
|
-
|
166
|
-
|
167
|
-
<li class="public ">
|
168
|
-
<span class="summary_signature">
|
169
|
-
|
170
|
-
<a href="#width-instance_method" title="#width (instance method)">#<strong>width</strong> ⇒ Object </a>
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
</span>
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
<span class="note title readonly">readonly</span>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
<span class="summary_desc"><div class='inline'>
|
190
|
-
<p>Returns the value of attribute width.</p>
|
191
|
-
</div></span>
|
192
|
-
|
193
|
-
</li>
|
194
|
-
|
195
|
-
|
196
|
-
</ul>
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
<h2>
|
203
|
-
Instance Method Summary
|
204
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
205
|
-
</h2>
|
206
|
-
|
207
|
-
<ul class="summary">
|
208
|
-
|
209
|
-
<li class="public ">
|
210
|
-
<span class="summary_signature">
|
211
|
-
|
212
|
-
<a href="#has_touch%3F-instance_method" title="#has_touch? (instance method)">#<strong>has_touch?</strong> ⇒ Boolean </a>
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
</span>
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
227
|
-
|
228
|
-
</li>
|
229
|
-
|
230
|
-
|
231
|
-
<li class="public ">
|
232
|
-
<span class="summary_signature">
|
233
|
-
|
234
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(width:, height:, device_scale_factor: 1.0, is_mobile: false, has_touch: false, is_landscape: false) ⇒ Viewport </a>
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
</span>
|
239
|
-
|
240
|
-
|
241
|
-
<span class="note title constructor">constructor</span>
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
<span class="summary_desc"><div class='inline'>
|
251
|
-
<p>A new instance of Viewport.</p>
|
252
|
-
</div></span>
|
253
|
-
|
254
|
-
</li>
|
255
|
-
|
256
|
-
|
257
|
-
<li class="public ">
|
258
|
-
<span class="summary_signature">
|
259
|
-
|
260
|
-
<a href="#landscape%3F-instance_method" title="#landscape? (instance method)">#<strong>landscape?</strong> ⇒ Boolean </a>
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
</span>
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
275
|
-
|
276
|
-
</li>
|
277
|
-
|
278
|
-
|
279
|
-
<li class="public ">
|
280
|
-
<span class="summary_signature">
|
281
|
-
|
282
|
-
<a href="#merge-instance_method" title="#merge (instance method)">#<strong>merge</strong>(width: nil, height: nil, device_scale_factor: nil, is_mobile: nil, has_touch: nil, is_landscape: nil) ⇒ Object </a>
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
</span>
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
297
|
-
|
298
|
-
</li>
|
299
|
-
|
300
|
-
|
301
|
-
<li class="public ">
|
302
|
-
<span class="summary_signature">
|
303
|
-
|
304
|
-
<a href="#mobile%3F-instance_method" title="#mobile? (instance method)">#<strong>mobile?</strong> ⇒ Boolean </a>
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
</span>
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
319
|
-
|
320
|
-
</li>
|
321
|
-
|
322
|
-
|
323
|
-
</ul>
|
324
|
-
|
325
|
-
|
326
|
-
<div id="constructor_details" class="method_details_list">
|
327
|
-
<h2>Constructor Details</h2>
|
328
|
-
|
329
|
-
<div class="method_details first">
|
330
|
-
<h3 class="signature first" id="initialize-instance_method">
|
331
|
-
|
332
|
-
#<strong>initialize</strong>(width:, height:, device_scale_factor: 1.0, is_mobile: false, has_touch: false, is_landscape: false) ⇒ <tt><span class='object_link'><a href="" title="Puppeteer::Viewport (class)">Viewport</a></span></tt>
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
</h3><div class="docstring">
|
339
|
-
<div class="discussion">
|
340
|
-
|
341
|
-
<p>Returns a new instance of Viewport.</p>
|
342
|
-
|
343
|
-
|
344
|
-
</div>
|
345
|
-
</div>
|
346
|
-
<div class="tags">
|
347
|
-
<p class="tag_title">Parameters:</p>
|
348
|
-
<ul class="param">
|
349
|
-
|
350
|
-
<li>
|
351
|
-
|
352
|
-
<span class='name'>width</span>
|
353
|
-
|
354
|
-
|
355
|
-
<span class='type'>(<tt>int</tt>)</span>
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
</li>
|
360
|
-
|
361
|
-
<li>
|
362
|
-
|
363
|
-
<span class='name'>height</span>
|
364
|
-
|
365
|
-
|
366
|
-
<span class='type'>(<tt>int</tt>)</span>
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
</li>
|
371
|
-
|
372
|
-
<li>
|
373
|
-
|
374
|
-
<span class='name'>device_scale_factor</span>
|
375
|
-
|
376
|
-
|
377
|
-
<span class='type'>(<tt>double</tt>)</span>
|
378
|
-
|
379
|
-
|
380
|
-
<em class="default">(defaults to: <tt>1.0</tt>)</em>
|
381
|
-
|
382
|
-
|
383
|
-
</li>
|
384
|
-
|
385
|
-
<li>
|
386
|
-
|
387
|
-
<span class='name'>is_mobile</span>
|
388
|
-
|
389
|
-
|
390
|
-
<span class='type'>(<tt>boolean</tt>)</span>
|
391
|
-
|
392
|
-
|
393
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
394
|
-
|
395
|
-
|
396
|
-
</li>
|
397
|
-
|
398
|
-
<li>
|
399
|
-
|
400
|
-
<span class='name'>has_touch</span>
|
401
|
-
|
402
|
-
|
403
|
-
<span class='type'>(<tt>boolean</tt>)</span>
|
404
|
-
|
405
|
-
|
406
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
407
|
-
|
408
|
-
|
409
|
-
</li>
|
410
|
-
|
411
|
-
<li>
|
412
|
-
|
413
|
-
<span class='name'>is_landscape</span>
|
414
|
-
|
415
|
-
|
416
|
-
<span class='type'>(<tt>boolean</tt>)</span>
|
417
|
-
|
418
|
-
|
419
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
420
|
-
|
421
|
-
|
422
|
-
</li>
|
423
|
-
|
424
|
-
</ul>
|
425
|
-
|
426
|
-
|
427
|
-
</div><table class="source_code">
|
428
|
-
<tr>
|
429
|
-
<td>
|
430
|
-
<pre class="lines">
|
431
|
-
|
432
|
-
|
433
|
-
8
|
434
|
-
9
|
435
|
-
10
|
436
|
-
11
|
437
|
-
12
|
438
|
-
13
|
439
|
-
14
|
440
|
-
15
|
441
|
-
16
|
442
|
-
17
|
443
|
-
18
|
444
|
-
19
|
445
|
-
20
|
446
|
-
21</pre>
|
447
|
-
</td>
|
448
|
-
<td>
|
449
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/viewport.rb', line 8</span>
|
450
|
-
|
451
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span>
|
452
|
-
<span class='label'>width:</span><span class='comma'>,</span>
|
453
|
-
<span class='label'>height:</span><span class='comma'>,</span>
|
454
|
-
<span class='label'>device_scale_factor:</span> <span class='float'>1.0</span><span class='comma'>,</span>
|
455
|
-
<span class='label'>is_mobile:</span> <span class='kw'>false</span><span class='comma'>,</span>
|
456
|
-
<span class='label'>has_touch:</span> <span class='kw'>false</span><span class='comma'>,</span>
|
457
|
-
<span class='label'>is_landscape:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
458
|
-
<span class='ivar'>@width</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span>
|
459
|
-
<span class='ivar'>@height</span> <span class='op'>=</span> <span class='id identifier rubyid_height'>height</span>
|
460
|
-
<span class='ivar'>@device_scale_factor</span> <span class='op'>=</span> <span class='id identifier rubyid_device_scale_factor'>device_scale_factor</span>
|
461
|
-
<span class='ivar'>@is_mobile</span> <span class='op'>=</span> <span class='id identifier rubyid_is_mobile'>is_mobile</span>
|
462
|
-
<span class='ivar'>@has_touch</span> <span class='op'>=</span> <span class='id identifier rubyid_has_touch'>has_touch</span>
|
463
|
-
<span class='ivar'>@is_landscape</span> <span class='op'>=</span> <span class='id identifier rubyid_is_landscape'>is_landscape</span>
|
464
|
-
<span class='kw'>end</span></pre>
|
465
|
-
</td>
|
466
|
-
</tr>
|
467
|
-
</table>
|
468
|
-
</div>
|
469
|
-
|
470
|
-
</div>
|
471
|
-
|
472
|
-
<div id="instance_attr_details" class="attr_details">
|
473
|
-
<h2>Instance Attribute Details</h2>
|
474
|
-
|
475
|
-
|
476
|
-
<span id=""></span>
|
477
|
-
<div class="method_details first">
|
478
|
-
<h3 class="signature first" id="device_scale_factor-instance_method">
|
479
|
-
|
480
|
-
#<strong>device_scale_factor</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
</h3><div class="docstring">
|
487
|
-
<div class="discussion">
|
488
|
-
|
489
|
-
<p>Returns the value of attribute device_scale_factor.</p>
|
490
|
-
|
491
|
-
|
492
|
-
</div>
|
493
|
-
</div>
|
494
|
-
<div class="tags">
|
495
|
-
|
496
|
-
|
497
|
-
</div><table class="source_code">
|
498
|
-
<tr>
|
499
|
-
<td>
|
500
|
-
<pre class="lines">
|
501
|
-
|
502
|
-
|
503
|
-
23
|
504
|
-
24
|
505
|
-
25</pre>
|
506
|
-
</td>
|
507
|
-
<td>
|
508
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/viewport.rb', line 23</span>
|
509
|
-
|
510
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_device_scale_factor'>device_scale_factor</span>
|
511
|
-
<span class='ivar'>@device_scale_factor</span>
|
512
|
-
<span class='kw'>end</span></pre>
|
513
|
-
</td>
|
514
|
-
</tr>
|
515
|
-
</table>
|
516
|
-
</div>
|
517
|
-
|
518
|
-
|
519
|
-
<span id=""></span>
|
520
|
-
<div class="method_details ">
|
521
|
-
<h3 class="signature " id="height-instance_method">
|
522
|
-
|
523
|
-
#<strong>height</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
</h3><div class="docstring">
|
530
|
-
<div class="discussion">
|
531
|
-
|
532
|
-
<p>Returns the value of attribute height.</p>
|
533
|
-
|
534
|
-
|
535
|
-
</div>
|
536
|
-
</div>
|
537
|
-
<div class="tags">
|
538
|
-
|
539
|
-
|
540
|
-
</div><table class="source_code">
|
541
|
-
<tr>
|
542
|
-
<td>
|
543
|
-
<pre class="lines">
|
544
|
-
|
545
|
-
|
546
|
-
23
|
547
|
-
24
|
548
|
-
25</pre>
|
549
|
-
</td>
|
550
|
-
<td>
|
551
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/viewport.rb', line 23</span>
|
552
|
-
|
553
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_height'>height</span>
|
554
|
-
<span class='ivar'>@height</span>
|
555
|
-
<span class='kw'>end</span></pre>
|
556
|
-
</td>
|
557
|
-
</tr>
|
558
|
-
</table>
|
559
|
-
</div>
|
560
|
-
|
561
|
-
|
562
|
-
<span id=""></span>
|
563
|
-
<div class="method_details ">
|
564
|
-
<h3 class="signature " id="width-instance_method">
|
565
|
-
|
566
|
-
#<strong>width</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
</h3><div class="docstring">
|
573
|
-
<div class="discussion">
|
574
|
-
|
575
|
-
<p>Returns the value of attribute width.</p>
|
576
|
-
|
577
|
-
|
578
|
-
</div>
|
579
|
-
</div>
|
580
|
-
<div class="tags">
|
581
|
-
|
582
|
-
|
583
|
-
</div><table class="source_code">
|
584
|
-
<tr>
|
585
|
-
<td>
|
586
|
-
<pre class="lines">
|
587
|
-
|
588
|
-
|
589
|
-
23
|
590
|
-
24
|
591
|
-
25</pre>
|
592
|
-
</td>
|
593
|
-
<td>
|
594
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/viewport.rb', line 23</span>
|
595
|
-
|
596
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_width'>width</span>
|
597
|
-
<span class='ivar'>@width</span>
|
598
|
-
<span class='kw'>end</span></pre>
|
599
|
-
</td>
|
600
|
-
</tr>
|
601
|
-
</table>
|
602
|
-
</div>
|
603
|
-
|
604
|
-
</div>
|
605
|
-
|
606
|
-
|
607
|
-
<div id="instance_method_details" class="method_details_list">
|
608
|
-
<h2>Instance Method Details</h2>
|
609
|
-
|
610
|
-
|
611
|
-
<div class="method_details first">
|
612
|
-
<h3 class="signature first" id="has_touch?-instance_method">
|
613
|
-
|
614
|
-
#<strong>has_touch?</strong> ⇒ <tt>Boolean</tt>
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
</h3><div class="docstring">
|
621
|
-
<div class="discussion">
|
622
|
-
|
623
|
-
|
624
|
-
</div>
|
625
|
-
</div>
|
626
|
-
<div class="tags">
|
627
|
-
|
628
|
-
<p class="tag_title">Returns:</p>
|
629
|
-
<ul class="return">
|
630
|
-
|
631
|
-
<li>
|
632
|
-
|
633
|
-
|
634
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
</li>
|
639
|
-
|
640
|
-
</ul>
|
641
|
-
|
642
|
-
</div><table class="source_code">
|
643
|
-
<tr>
|
644
|
-
<td>
|
645
|
-
<pre class="lines">
|
646
|
-
|
647
|
-
|
648
|
-
29
|
649
|
-
30
|
650
|
-
31</pre>
|
651
|
-
</td>
|
652
|
-
<td>
|
653
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/viewport.rb', line 29</span>
|
654
|
-
|
655
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_has_touch?'>has_touch?</span>
|
656
|
-
<span class='ivar'>@has_touch</span>
|
657
|
-
<span class='kw'>end</span></pre>
|
658
|
-
</td>
|
659
|
-
</tr>
|
660
|
-
</table>
|
661
|
-
</div>
|
662
|
-
|
663
|
-
<div class="method_details ">
|
664
|
-
<h3 class="signature " id="landscape?-instance_method">
|
665
|
-
|
666
|
-
#<strong>landscape?</strong> ⇒ <tt>Boolean</tt>
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
</h3><div class="docstring">
|
673
|
-
<div class="discussion">
|
674
|
-
|
675
|
-
|
676
|
-
</div>
|
677
|
-
</div>
|
678
|
-
<div class="tags">
|
679
|
-
|
680
|
-
<p class="tag_title">Returns:</p>
|
681
|
-
<ul class="return">
|
682
|
-
|
683
|
-
<li>
|
684
|
-
|
685
|
-
|
686
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
</li>
|
691
|
-
|
692
|
-
</ul>
|
693
|
-
|
694
|
-
</div><table class="source_code">
|
695
|
-
<tr>
|
696
|
-
<td>
|
697
|
-
<pre class="lines">
|
698
|
-
|
699
|
-
|
700
|
-
33
|
701
|
-
34
|
702
|
-
35</pre>
|
703
|
-
</td>
|
704
|
-
<td>
|
705
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/viewport.rb', line 33</span>
|
706
|
-
|
707
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_landscape?'>landscape?</span>
|
708
|
-
<span class='ivar'>@is_landscape</span>
|
709
|
-
<span class='kw'>end</span></pre>
|
710
|
-
</td>
|
711
|
-
</tr>
|
712
|
-
</table>
|
713
|
-
</div>
|
714
|
-
|
715
|
-
<div class="method_details ">
|
716
|
-
<h3 class="signature " id="merge-instance_method">
|
717
|
-
|
718
|
-
#<strong>merge</strong>(width: nil, height: nil, device_scale_factor: nil, is_mobile: nil, has_touch: nil, is_landscape: nil) ⇒ <tt>Object</tt>
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
</h3><table class="source_code">
|
725
|
-
<tr>
|
726
|
-
<td>
|
727
|
-
<pre class="lines">
|
728
|
-
|
729
|
-
|
730
|
-
37
|
731
|
-
38
|
732
|
-
39
|
733
|
-
40
|
734
|
-
41
|
735
|
-
42
|
736
|
-
43
|
737
|
-
44
|
738
|
-
45
|
739
|
-
46
|
740
|
-
47
|
741
|
-
48
|
742
|
-
49
|
743
|
-
50
|
744
|
-
51
|
745
|
-
52
|
746
|
-
53</pre>
|
747
|
-
</td>
|
748
|
-
<td>
|
749
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/viewport.rb', line 37</span>
|
750
|
-
|
751
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span>
|
752
|
-
<span class='label'>width:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
753
|
-
<span class='label'>height:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
754
|
-
<span class='label'>device_scale_factor:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
755
|
-
<span class='label'>is_mobile:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
756
|
-
<span class='label'>has_touch:</span> <span class='kw'>nil</span><span class='comma'>,</span>
|
757
|
-
<span class='label'>is_landscape:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
758
|
-
|
759
|
-
<span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Puppeteer::Viewport (class)">Viewport</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Puppeteer::Viewport#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
760
|
-
<span class='label'>width:</span> <span class='id identifier rubyid_width'>width</span> <span class='op'>||</span> <span class='ivar'>@width</span><span class='comma'>,</span>
|
761
|
-
<span class='label'>height:</span> <span class='id identifier rubyid_height'>height</span> <span class='op'>||</span> <span class='ivar'>@height</span><span class='comma'>,</span>
|
762
|
-
<span class='label'>device_scale_factor:</span> <span class='id identifier rubyid_device_scale_factor'>device_scale_factor</span> <span class='op'>||</span> <span class='ivar'>@device_scale_factor</span><span class='comma'>,</span>
|
763
|
-
<span class='label'>is_mobile:</span> <span class='id identifier rubyid_is_mobile'>is_mobile</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='ivar'>@is_mobile</span> <span class='op'>:</span> <span class='id identifier rubyid_is_mobile'>is_mobile</span><span class='comma'>,</span>
|
764
|
-
<span class='label'>has_touch:</span> <span class='id identifier rubyid_has_touch'>has_touch</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='ivar'>@has_touch</span> <span class='op'>:</span> <span class='id identifier rubyid_has_touch'>has_touch</span><span class='comma'>,</span>
|
765
|
-
<span class='label'>is_landscape:</span> <span class='id identifier rubyid_is_landscape'>is_landscape</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='ivar'>@is_landscape</span> <span class='op'>:</span> <span class='id identifier rubyid_is_landscape'>is_landscape</span><span class='comma'>,</span>
|
766
|
-
<span class='rparen'>)</span>
|
767
|
-
<span class='kw'>end</span></pre>
|
768
|
-
</td>
|
769
|
-
</tr>
|
770
|
-
</table>
|
771
|
-
</div>
|
772
|
-
|
773
|
-
<div class="method_details ">
|
774
|
-
<h3 class="signature " id="mobile?-instance_method">
|
775
|
-
|
776
|
-
#<strong>mobile?</strong> ⇒ <tt>Boolean</tt>
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
</h3><div class="docstring">
|
783
|
-
<div class="discussion">
|
784
|
-
|
785
|
-
|
786
|
-
</div>
|
787
|
-
</div>
|
788
|
-
<div class="tags">
|
789
|
-
|
790
|
-
<p class="tag_title">Returns:</p>
|
791
|
-
<ul class="return">
|
792
|
-
|
793
|
-
<li>
|
794
|
-
|
795
|
-
|
796
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
</li>
|
801
|
-
|
802
|
-
</ul>
|
803
|
-
|
804
|
-
</div><table class="source_code">
|
805
|
-
<tr>
|
806
|
-
<td>
|
807
|
-
<pre class="lines">
|
808
|
-
|
809
|
-
|
810
|
-
25
|
811
|
-
26
|
812
|
-
27</pre>
|
813
|
-
</td>
|
814
|
-
<td>
|
815
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/viewport.rb', line 25</span>
|
816
|
-
|
817
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_mobile?'>mobile?</span>
|
818
|
-
<span class='ivar'>@is_mobile</span>
|
819
|
-
<span class='kw'>end</span></pre>
|
820
|
-
</td>
|
821
|
-
</tr>
|
822
|
-
</table>
|
823
|
-
</div>
|
824
|
-
|
825
|
-
</div>
|
826
|
-
|
827
|
-
</div>
|
828
|
-
|
829
|
-
<div id="footer">
|
830
|
-
Generated on Tue Jun 23 10:24:59 2020 by
|
831
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
832
|
-
0.9.24 (ruby-2.6.3).
|
833
|
-
</div>
|
834
|
-
|
835
|
-
</div>
|
836
|
-
</body>
|
837
|
-
</html>
|