puppeteer-ruby 0.0.4 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +30 -0
  3. data/.rubocop.yml +4 -5
  4. data/README.md +3 -2
  5. data/docs/Puppeteer.html +2020 -0
  6. data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
  7. data/docs/Puppeteer/Browser.html +2148 -0
  8. data/docs/Puppeteer/BrowserContext.html +809 -0
  9. data/docs/Puppeteer/BrowserFetcher.html +214 -0
  10. data/docs/Puppeteer/BrowserRunner.html +914 -0
  11. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
  12. data/docs/Puppeteer/CDPSession.html +813 -0
  13. data/docs/Puppeteer/CDPSession/Error.html +124 -0
  14. data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
  15. data/docs/Puppeteer/Connection.html +960 -0
  16. data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
  17. data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
  18. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
  19. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
  20. data/docs/Puppeteer/ConsoleMessage.html +565 -0
  21. data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
  22. data/docs/Puppeteer/DOMWorld.html +2219 -0
  23. data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
  24. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
  25. data/docs/Puppeteer/DebugPrint.html +233 -0
  26. data/docs/Puppeteer/Device.html +470 -0
  27. data/docs/Puppeteer/Devices.html +139 -0
  28. data/docs/Puppeteer/ElementHandle.html +2542 -0
  29. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
  30. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
  31. data/docs/Puppeteer/ElementHandle/Point.html +492 -0
  32. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
  33. data/docs/Puppeteer/EmulationManager.html +454 -0
  34. data/docs/Puppeteer/EventCallbackable.html +433 -0
  35. data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
  36. data/docs/Puppeteer/ExecutionContext.html +998 -0
  37. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
  38. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
  39. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
  40. data/docs/Puppeteer/FileChooser.html +455 -0
  41. data/docs/Puppeteer/Frame.html +3677 -0
  42. data/docs/Puppeteer/FrameManager.html +2410 -0
  43. data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
  44. data/docs/Puppeteer/IfPresent.html +222 -0
  45. data/docs/Puppeteer/JSHandle.html +1352 -0
  46. data/docs/Puppeteer/Keyboard.html +1557 -0
  47. data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
  48. data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
  49. data/docs/Puppeteer/Launcher.html +237 -0
  50. data/docs/Puppeteer/Launcher/Base.html +385 -0
  51. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
  52. data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
  53. data/docs/Puppeteer/Launcher/Chrome.html +669 -0
  54. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
  55. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
  56. data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
  57. data/docs/Puppeteer/LifecycleWatcher.html +834 -0
  58. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
  59. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
  60. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
  61. data/docs/Puppeteer/Mouse.html +1105 -0
  62. data/docs/Puppeteer/Mouse/Button.html +136 -0
  63. data/docs/Puppeteer/NetworkManager.html +901 -0
  64. data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
  65. data/docs/Puppeteer/Page.html +5970 -0
  66. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +206 -0
  67. data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
  68. data/docs/Puppeteer/Page/ScriptTag.html +555 -0
  69. data/docs/Puppeteer/Page/StyleTag.html +448 -0
  70. data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
  71. data/docs/Puppeteer/RemoteObject.html +1087 -0
  72. data/docs/Puppeteer/Target.html +1336 -0
  73. data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
  74. data/docs/Puppeteer/Target/TargetInfo.html +729 -0
  75. data/docs/Puppeteer/TimeoutError.html +135 -0
  76. data/docs/Puppeteer/TimeoutSettings.html +496 -0
  77. data/docs/Puppeteer/TouchScreen.html +464 -0
  78. data/docs/Puppeteer/Viewport.html +837 -0
  79. data/docs/Puppeteer/WaitTask.html +637 -0
  80. data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
  81. data/docs/Puppeteer/WaitTask/TimeoutError.html +206 -0
  82. data/docs/Puppeteer/WebSocket.html +673 -0
  83. data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
  84. data/docs/Puppeteer/WebSocketTransport.html +600 -0
  85. data/docs/Puppeteer/WebSocktTransportError.html +124 -0
  86. data/docs/_index.html +823 -0
  87. data/docs/class_list.html +51 -0
  88. data/docs/css/common.css +1 -0
  89. data/docs/css/full_list.css +58 -0
  90. data/docs/css/style.css +496 -0
  91. data/docs/file.README.html +123 -0
  92. data/docs/file_list.html +56 -0
  93. data/docs/frames.html +17 -0
  94. data/docs/index.html +123 -0
  95. data/docs/js/app.js +314 -0
  96. data/docs/js/full_list.js +216 -0
  97. data/docs/js/jquery.js +4 -0
  98. data/docs/method_list.html +4075 -0
  99. data/docs/top-level-namespace.html +126 -0
  100. data/lib/puppeteer.rb +16 -8
  101. data/lib/puppeteer/async_await_behavior.rb +6 -0
  102. data/lib/puppeteer/browser.rb +25 -6
  103. data/lib/puppeteer/browser_runner.rb +1 -1
  104. data/lib/puppeteer/cdp_session.rb +33 -11
  105. data/lib/puppeteer/connection.rb +1 -1
  106. data/lib/puppeteer/dom_world.rb +121 -104
  107. data/lib/puppeteer/element_handle.rb +186 -224
  108. data/lib/puppeteer/element_handle/bounding_box.rb +12 -0
  109. data/lib/puppeteer/element_handle/box_model.rb +19 -0
  110. data/lib/puppeteer/element_handle/point.rb +26 -0
  111. data/lib/puppeteer/errors.rb +1 -3
  112. data/lib/puppeteer/execution_context.rb +36 -17
  113. data/lib/puppeteer/file_chooser.rb +29 -0
  114. data/lib/puppeteer/frame.rb +17 -11
  115. data/lib/puppeteer/frame_manager.rb +1 -3
  116. data/lib/puppeteer/js_handle.rb +3 -2
  117. data/lib/puppeteer/launcher.rb +0 -1
  118. data/lib/puppeteer/launcher/chrome.rb +48 -2
  119. data/lib/puppeteer/lifecycle_watcher.rb +3 -3
  120. data/lib/puppeteer/page.rb +121 -68
  121. data/lib/puppeteer/remote_object.rb +15 -1
  122. data/lib/puppeteer/target.rb +24 -24
  123. data/lib/puppeteer/version.rb +1 -1
  124. data/lib/puppeteer/viewport.rb +18 -0
  125. data/lib/puppeteer/wait_task.rb +183 -1
  126. data/lib/puppeteer/web_socket.rb +3 -1
  127. data/lib/puppeteer/web_socket_transport.rb +1 -1
  128. data/puppeteer-ruby.gemspec +4 -1
  129. metadata +145 -4
@@ -0,0 +1,837 @@
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
+ &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::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> &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">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> &#x21d2; 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> &#x21d2; 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> &#x21d2; 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> &#x21d2; 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) &#x21d2; 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> &#x21d2; 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) &#x21d2; 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> &#x21d2; 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) &#x21d2; <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> &#x21d2; <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> &#x21d2; <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> &#x21d2; <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> &#x21d2; <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> &#x21d2; <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) &#x21d2; <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> &#x21d2; <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 Fri Jun 12 12:38:34 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>