Class: Playwright::PlaywrightApi::ChannelOwnerWrapper
- Inherits:
-
Object
- Object
- Playwright::PlaywrightApi::ChannelOwnerWrapper
- Defined in:
- lib/playwright/playwright_api.rb
Instance Method Summary collapse
-
#initialize(impl) ⇒ ChannelOwnerWrapper
constructor
A new instance of ChannelOwnerWrapper.
- #wrap ⇒ Object
Constructor Details
#initialize(impl) ⇒ ChannelOwnerWrapper
Returns a new instance of ChannelOwnerWrapper.
22 23 24 25 26 27 28 29 |
# File 'lib/playwright/playwright_api.rb', line 22 def initialize(impl) impl_class_name = impl.class.name unless impl_class_name.include?("::ChannelOwners::") raise "#{impl_class_name} is not ChannelOwners" end @impl = impl end |
Instance Method Details
#wrap ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/playwright/playwright_api.rb', line 31 def wrap api_class = detect_class_for(@impl.class) if api_class api_class.new(@impl) else raise NotImplementedError.new("Playwright::#{expected_class_name_for(@impl.class)} is not implemented") end end |