Class: Playwright::JavaScript::SourceUrl
- Inherits:
-
Object
- Object
- Playwright::JavaScript::SourceUrl
- Defined in:
- lib/playwright/javascript/source_url.rb
Instance Method Summary collapse
-
#initialize(source, path) ⇒ SourceUrl
constructor
A new instance of SourceUrl.
- #to_s ⇒ Object
Constructor Details
#initialize(source, path) ⇒ SourceUrl
Returns a new instance of SourceUrl.
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_s ⇒ Object
11 12 13 |
# File 'lib/playwright/javascript/source_url.rb', line 11 def to_s "#{@source}\n//# sourceURL=#{@source_url}" end |