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