Class: Playwright::Download
- Inherits:
-
Object
- Object
- Playwright::Download
- Defined in:
- lib/playwright/download.rb
Instance Attribute Summary collapse
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#suggested_filename ⇒ Object
readonly
Returns the value of attribute suggested_filename.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #delete ⇒ Object
- #failure ⇒ Object
-
#initialize(page:, url:, suggested_filename:, artifact:) ⇒ Download
constructor
A new instance of Download.
- #path ⇒ Object
- #save_as(path) ⇒ Object
Constructor Details
#initialize(page:, url:, suggested_filename:, artifact:) ⇒ Download
Returns a new instance of Download.
3 4 5 6 7 8 |
# File 'lib/playwright/download.rb', line 3 def initialize(page:, url:, suggested_filename:, artifact:) @page = page @url = url @suggested_filename = suggested_filename @artifact = artifact end |
Instance Attribute Details
#page ⇒ Object (readonly)
Returns the value of attribute page.
10 11 12 |
# File 'lib/playwright/download.rb', line 10 def page @page end |
#suggested_filename ⇒ Object (readonly)
Returns the value of attribute suggested_filename.
10 11 12 |
# File 'lib/playwright/download.rb', line 10 def suggested_filename @suggested_filename end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
10 11 12 |
# File 'lib/playwright/download.rb', line 10 def url @url end |
Instance Method Details
#delete ⇒ Object
12 13 14 |
# File 'lib/playwright/download.rb', line 12 def delete @artifact.delete end |
#failure ⇒ Object
16 17 18 |
# File 'lib/playwright/download.rb', line 16 def failure @artifact.failure end |
#path ⇒ Object
20 21 22 |
# File 'lib/playwright/download.rb', line 20 def path @artifact.path_after_finished end |
#save_as(path) ⇒ Object
24 25 26 |
# File 'lib/playwright/download.rb', line 24 def save_as(path) @artifact.save_as(path) end |