Class: Playwright::PlaywrightApi
- Inherits:
-
Object
- Object
- Playwright::PlaywrightApi
- Defined in:
- lib/playwright/playwright_api.rb
Direct Known Subclasses
Accessibility, Android, AndroidDevice, AndroidInput, AndroidSocket, AndroidWebView, BindingCall, Browser, BrowserContext, BrowserType, CDPSession, ConsoleMessage, Dialog, Download, FileChooser, Frame, JSHandle, Keyboard, Mouse, Page, Playwright, Request, Response, Route, Selectors, Touchscreen, Video, WebSocket, Worker
Defined Under Namespace
Classes: ApiImplementationWrapper, ChannelOwnerWrapper
Class Method Summary collapse
-
.wrap(channel_owner_or_api_implementation) ⇒ Object
Wrap ChannelOwner / ApiImplementation.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(impl) ⇒ PlaywrightApi
constructor
A new instance of PlaywrightApi.
Constructor Details
#initialize(impl) ⇒ PlaywrightApi
Returns a new instance of PlaywrightApi.
100 101 102 |
# File 'lib/playwright/playwright_api.rb', line 100 def initialize(impl) @impl = impl end |
Class Method Details
.wrap(channel_owner_or_api_implementation) ⇒ Object
Intended for internal use only.
Wrap ChannelOwner / ApiImplementation. Playwright::ChannelOwners::XXXXX will be wrapped as Playwright::XXXXX Playwright::YYYYImpl will be wrapped as Playwright::YYYY Playwright::XXXXX is automatically generated by development/generate_api
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/playwright/playwright_api.rb', line 10 def self.wrap(channel_owner_or_api_implementation) case channel_owner_or_api_implementation when ChannelOwner ChannelOwnerWrapper.new(channel_owner_or_api_implementation).wrap when ApiImplementation ApiImplementationWrapper.new(channel_owner_or_api_implementation).wrap else nil end end |
Instance Method Details
#==(other) ⇒ Object
104 105 106 |
# File 'lib/playwright/playwright_api.rb', line 104 def ==(other) @impl.to_s == other.instance_variable_get(:'@impl').to_s end |