Class: Playwright::JavaScript::SourceUrl

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

Instance Method Summary collapse

Constructor Details

#initialize(source, path) ⇒ SourceUrl

Returns a new instance of SourceUrl.

Parameters:

  • source (String)
  • path (String)


6
7
8
9
# File 'lib/playwright/javascript/source_url.rb', line 6

def initialize(source, path)
  @source = source
  @source_url = path.to_s.gsub("\n", '')
end

Instance Method Details

#to_sObject



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

def to_s
  "#{@source}\n//# sourceURL=#{@source_url}"
end