Class: Playwright::Download

Inherits:
Object
  • Object
show all
Defined in:
lib/playwright/download.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_filenameObject (readonly)

Returns the value of attribute suggested_filename.



9
10
11
# File 'lib/playwright/download.rb', line 9

def suggested_filename
  @suggested_filename
end

#urlObject (readonly)

Returns the value of attribute url.



9
10
11
# File 'lib/playwright/download.rb', line 9

def url
  @url
end

Instance Method Details

#deleteObject



11
12
13
# File 'lib/playwright/download.rb', line 11

def delete
  @artifact.delete
end

#failureObject



15
16
17
# File 'lib/playwright/download.rb', line 15

def failure
  @artifact.failure
end

#pathObject



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