playwright-ruby-client 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -5
  3. data/lib/playwright.rb +4 -0
  4. data/lib/playwright/channel_owner.rb +13 -0
  5. data/lib/playwright/channel_owners/browser.rb +7 -14
  6. data/lib/playwright/channel_owners/browser_context.rb +43 -0
  7. data/lib/playwright/channel_owners/console_message.rb +0 -4
  8. data/lib/playwright/channel_owners/frame.rb +121 -7
  9. data/lib/playwright/channel_owners/page.rb +218 -0
  10. data/lib/playwright/connection.rb +6 -8
  11. data/lib/playwright/event_emitter.rb +13 -0
  12. data/lib/playwright/javascript.rb +13 -0
  13. data/lib/playwright/javascript/expression.rb +30 -0
  14. data/lib/playwright/javascript/function.rb +30 -0
  15. data/lib/playwright/javascript/value_parser.rb +75 -0
  16. data/lib/playwright/javascript/value_serializer.rb +54 -0
  17. data/lib/playwright/playwright_api.rb +8 -4
  18. data/lib/playwright/timeout_settings.rb +19 -0
  19. data/lib/playwright/utils.rb +19 -0
  20. data/lib/playwright/version.rb +1 -1
  21. data/lib/playwright/wait_helper.rb +73 -0
  22. data/lib/playwright_api/binding_call.rb +18 -0
  23. data/lib/playwright_api/browser.rb +18 -0
  24. data/lib/playwright_api/browser_context.rb +27 -4
  25. data/lib/playwright_api/browser_type.rb +18 -0
  26. data/lib/playwright_api/chromium_browser_context.rb +18 -0
  27. data/lib/playwright_api/console_message.rb +18 -0
  28. data/lib/playwright_api/element_handle.rb +19 -0
  29. data/lib/playwright_api/file_chooser.rb +1 -0
  30. data/lib/playwright_api/frame.rb +36 -12
  31. data/lib/playwright_api/js_handle.rb +18 -0
  32. data/lib/playwright_api/page.rb +40 -21
  33. data/lib/playwright_api/playwright.rb +18 -0
  34. data/lib/playwright_api/request.rb +18 -0
  35. data/lib/playwright_api/response.rb +18 -0
  36. data/lib/playwright_api/selectors.rb +18 -0
  37. data/playwright.gemspec +2 -0
  38. metadata +38 -2
@@ -89,7 +89,7 @@ module Playwright
89
89
  #
90
90
  # > **NOTE** the default browser context cannot be closed.
91
91
  def close
92
- raise NotImplementedError.new('close is not implemented yet.')
92
+ wrap_channel_owner(@channel_owner.close)
93
93
  end
94
94
 
95
95
  # If no URLs are specified, this method returns all cookies. If URLs are specified, only cookies that affect those URLs
@@ -199,7 +199,7 @@ module Playwright
199
199
  # Returns all open pages in the context. Non visible pages, such as `"background_page"`, will not be listed here. You can
200
200
  # find them using [`method: ChromiumBrowserContext.backgroundPages`].
201
201
  def pages
202
- raise NotImplementedError.new('pages is not implemented yet.')
202
+ wrap_channel_owner(@channel_owner.pages)
203
203
  end
204
204
 
205
205
  # Routing provides the capability to modify network requests that are made by any page in the browser context. Once route
@@ -317,19 +317,42 @@ module Playwright
317
317
  raise NotImplementedError.new('wait_for_event is not implemented yet.')
318
318
  end
319
319
 
320
+ # @nodoc
321
+ def browser=(req)
322
+ wrap_channel_owner(@channel_owner.browser=(req))
323
+ end
324
+
320
325
  # @nodoc
321
326
  def owner_page=(req)
322
327
  wrap_channel_owner(@channel_owner.owner_page=(req))
323
328
  end
324
329
 
325
330
  # @nodoc
326
- def browser=(req)
327
- wrap_channel_owner(@channel_owner.browser=(req))
331
+ def after_initialize
332
+ wrap_channel_owner(@channel_owner.after_initialize)
328
333
  end
329
334
 
330
335
  # @nodoc
331
336
  def options=(req)
332
337
  wrap_channel_owner(@channel_owner.options=(req))
333
338
  end
339
+
340
+ # -- inherited from EventEmitter --
341
+ # @nodoc
342
+ def off(event, callback)
343
+ wrap_channel_owner(@channel_owner.off(event, callback))
344
+ end
345
+
346
+ # -- inherited from EventEmitter --
347
+ # @nodoc
348
+ def once(event, callback)
349
+ wrap_channel_owner(@channel_owner.once(event, callback))
350
+ end
351
+
352
+ # -- inherited from EventEmitter --
353
+ # @nodoc
354
+ def on(event, callback)
355
+ wrap_channel_owner(@channel_owner.on(event, callback))
356
+ end
334
357
  end
335
358
  end
@@ -159,5 +159,23 @@ module Playwright
159
159
  def name
160
160
  wrap_channel_owner(@channel_owner.name)
161
161
  end
162
+
163
+ # -- inherited from EventEmitter --
164
+ # @nodoc
165
+ def off(event, callback)
166
+ wrap_channel_owner(@channel_owner.off(event, callback))
167
+ end
168
+
169
+ # -- inherited from EventEmitter --
170
+ # @nodoc
171
+ def once(event, callback)
172
+ wrap_channel_owner(@channel_owner.once(event, callback))
173
+ end
174
+
175
+ # -- inherited from EventEmitter --
176
+ # @nodoc
177
+ def on(event, callback)
178
+ wrap_channel_owner(@channel_owner.on(event, callback))
179
+ end
162
180
  end
163
181
  end
@@ -25,5 +25,23 @@ module Playwright
25
25
  def service_workers
26
26
  raise NotImplementedError.new('service_workers is not implemented yet.')
27
27
  end
28
+
29
+ # -- inherited from EventEmitter --
30
+ # @nodoc
31
+ def off(event, callback)
32
+ wrap_channel_owner(@channel_owner.off(event, callback))
33
+ end
34
+
35
+ # -- inherited from EventEmitter --
36
+ # @nodoc
37
+ def once(event, callback)
38
+ wrap_channel_owner(@channel_owner.once(event, callback))
39
+ end
40
+
41
+ # -- inherited from EventEmitter --
42
+ # @nodoc
43
+ def on(event, callback)
44
+ wrap_channel_owner(@channel_owner.on(event, callback))
45
+ end
28
46
  end
29
47
  end
@@ -25,5 +25,23 @@ module Playwright
25
25
  def type
26
26
  wrap_channel_owner(@channel_owner.type)
27
27
  end
28
+
29
+ # -- inherited from EventEmitter --
30
+ # @nodoc
31
+ def off(event, callback)
32
+ wrap_channel_owner(@channel_owner.off(event, callback))
33
+ end
34
+
35
+ # -- inherited from EventEmitter --
36
+ # @nodoc
37
+ def once(event, callback)
38
+ wrap_channel_owner(@channel_owner.once(event, callback))
39
+ end
40
+
41
+ # -- inherited from EventEmitter --
42
+ # @nodoc
43
+ def on(event, callback)
44
+ wrap_channel_owner(@channel_owner.on(event, callback))
45
+ end
28
46
  end
29
47
  end
@@ -366,6 +366,7 @@ module Playwright
366
366
  def set_input_files(files, noWaitAfter: nil, timeout: nil)
367
367
  raise NotImplementedError.new('set_input_files is not implemented yet.')
368
368
  end
369
+ alias_method :input_files=, :set_input_files
369
370
 
370
371
  # This method taps the element by performing the following steps:
371
372
  # 1. Wait for [actionability](./actionability.md) checks on the element, unless `force` option is set.
@@ -470,5 +471,23 @@ module Playwright
470
471
  def wait_for_selector(selector, state: nil, timeout: nil)
471
472
  raise NotImplementedError.new('wait_for_selector is not implemented yet.')
472
473
  end
474
+
475
+ # -- inherited from EventEmitter --
476
+ # @nodoc
477
+ def off(event, callback)
478
+ wrap_channel_owner(@channel_owner.off(event, callback))
479
+ end
480
+
481
+ # -- inherited from EventEmitter --
482
+ # @nodoc
483
+ def once(event, callback)
484
+ wrap_channel_owner(@channel_owner.once(event, callback))
485
+ end
486
+
487
+ # -- inherited from EventEmitter --
488
+ # @nodoc
489
+ def on(event, callback)
490
+ wrap_channel_owner(@channel_owner.on(event, callback))
491
+ end
473
492
  end
474
493
  end
@@ -29,5 +29,6 @@ module Playwright
29
29
  def set_files(files, noWaitAfter: nil, timeout: nil)
30
30
  raise NotImplementedError.new('set_files is not implemented yet.')
31
31
  end
32
+ alias_method :files=, :set_files
32
33
  end
33
34
  end
@@ -130,7 +130,7 @@ module Playwright
130
130
  end
131
131
 
132
132
  def child_frames
133
- raise NotImplementedError.new('child_frames is not implemented yet.')
133
+ wrap_channel_owner(@channel_owner.child_frames)
134
134
  end
135
135
 
136
136
  # This method clicks an element matching `selector` by performing the following steps:
@@ -158,7 +158,7 @@ module Playwright
158
158
 
159
159
  # Gets the full HTML contents of the frame, including the doctype.
160
160
  def content
161
- raise NotImplementedError.new('content is not implemented yet.')
161
+ wrap_channel_owner(@channel_owner.content)
162
162
  end
163
163
 
164
164
  # This method double clicks an element matching `selector` by performing the following steps:
@@ -252,7 +252,7 @@ module Playwright
252
252
  # await bodyHandle.dispose();
253
253
  # ```
254
254
  def evaluate(pageFunction, arg: nil)
255
- raise NotImplementedError.new('evaluate is not implemented yet.')
255
+ wrap_channel_owner(@channel_owner.evaluate(pageFunction, arg: arg))
256
256
  end
257
257
 
258
258
  # Returns the return value of `pageFunction` as in-page object (JSHandle).
@@ -286,7 +286,7 @@ module Playwright
286
286
  # await resultHandle.dispose();
287
287
  # ```
288
288
  def evaluate_handle(pageFunction, arg: nil)
289
- raise NotImplementedError.new('evaluate_handle is not implemented yet.')
289
+ wrap_channel_owner(@channel_owner.evaluate_handle(pageFunction, arg: arg))
290
290
  end
291
291
 
292
292
  # This method waits for an element matching `selector`, waits for [actionability](./actionability.md) checks, focuses the
@@ -302,7 +302,7 @@ module Playwright
302
302
  # This method fetches an element with `selector` and focuses it. If there's no element matching `selector`, the method
303
303
  # waits until a matching element appears in the DOM.
304
304
  def focus(selector, timeout: nil)
305
- raise NotImplementedError.new('focus is not implemented yet.')
305
+ wrap_channel_owner(@channel_owner.focus(selector, timeout: timeout))
306
306
  end
307
307
 
308
308
  # Returns the `frame` or `iframe` element handle which corresponds to this frame.
@@ -420,7 +420,7 @@ module Playwright
420
420
  # > **NOTE** This value is calculated once when the frame is created, and will not update if the attribute is changed
421
421
  # later.
422
422
  def name
423
- raise NotImplementedError.new('name is not implemented yet.')
423
+ wrap_channel_owner(@channel_owner.name)
424
424
  end
425
425
 
426
426
  # Returns the page containing this frame.
@@ -430,7 +430,7 @@ module Playwright
430
430
 
431
431
  # Parent frame, if any. Detached frames and main frames return `null`.
432
432
  def parent_frame
433
- raise NotImplementedError.new('parent_frame is not implemented yet.')
433
+ wrap_channel_owner(@channel_owner.parent_frame)
434
434
  end
435
435
 
436
436
  # `key` can specify the intended [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key)
@@ -455,7 +455,7 @@ module Playwright
455
455
  delay: nil,
456
456
  noWaitAfter: nil,
457
457
  timeout: nil)
458
- raise NotImplementedError.new('press is not implemented yet.')
458
+ wrap_channel_owner(@channel_owner.press(selector, key, delay: delay, noWaitAfter: noWaitAfter, timeout: timeout))
459
459
  end
460
460
 
461
461
  # Returns the array of option values that have been successfully selected.
@@ -479,8 +479,9 @@ module Playwright
479
479
  end
480
480
 
481
481
  def set_content(html, timeout: nil, waitUntil: nil)
482
- raise NotImplementedError.new('set_content is not implemented yet.')
482
+ wrap_channel_owner(@channel_owner.set_content(html, timeout: timeout, waitUntil: waitUntil))
483
483
  end
484
+ alias_method :content=, :set_content
484
485
 
485
486
  # This method expects `selector` to point to an
486
487
  # [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input).
@@ -520,7 +521,7 @@ module Playwright
520
521
 
521
522
  # Returns the page title.
522
523
  def title
523
- raise NotImplementedError.new('title is not implemented yet.')
524
+ wrap_channel_owner(@channel_owner.title)
524
525
  end
525
526
 
526
527
  # Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text. `frame.type` can be used to
@@ -539,7 +540,7 @@ module Playwright
539
540
  delay: nil,
540
541
  noWaitAfter: nil,
541
542
  timeout: nil)
542
- raise NotImplementedError.new('type_text is not implemented yet.')
543
+ wrap_channel_owner(@channel_owner.type_text(selector, text, delay: delay, noWaitAfter: noWaitAfter, timeout: timeout))
543
544
  end
544
545
 
545
546
  # This method checks an element matching `selector` by performing the following steps:
@@ -561,7 +562,7 @@ module Playwright
561
562
 
562
563
  # Returns frame's url.
563
564
  def url
564
- raise NotImplementedError.new('url is not implemented yet.')
565
+ wrap_channel_owner(@channel_owner.url)
565
566
  end
566
567
 
567
568
  # Returns when the `pageFunction` returns a truthy value, returns that value.
@@ -666,9 +667,32 @@ module Playwright
666
667
  raise NotImplementedError.new('wait_for_timeout is not implemented yet.')
667
668
  end
668
669
 
670
+ # @nodoc
671
+ def detached=(req)
672
+ wrap_channel_owner(@channel_owner.detached=(req))
673
+ end
674
+
669
675
  # @nodoc
670
676
  def after_initialize
671
677
  wrap_channel_owner(@channel_owner.after_initialize)
672
678
  end
679
+
680
+ # -- inherited from EventEmitter --
681
+ # @nodoc
682
+ def off(event, callback)
683
+ wrap_channel_owner(@channel_owner.off(event, callback))
684
+ end
685
+
686
+ # -- inherited from EventEmitter --
687
+ # @nodoc
688
+ def once(event, callback)
689
+ wrap_channel_owner(@channel_owner.once(event, callback))
690
+ end
691
+
692
+ # -- inherited from EventEmitter --
693
+ # @nodoc
694
+ def on(event, callback)
695
+ wrap_channel_owner(@channel_owner.on(event, callback))
696
+ end
673
697
  end
674
698
  end
@@ -85,5 +85,23 @@ module Playwright
85
85
  def json_value
86
86
  raise NotImplementedError.new('json_value is not implemented yet.')
87
87
  end
88
+
89
+ # -- inherited from EventEmitter --
90
+ # @nodoc
91
+ def off(event, callback)
92
+ wrap_channel_owner(@channel_owner.off(event, callback))
93
+ end
94
+
95
+ # -- inherited from EventEmitter --
96
+ # @nodoc
97
+ def once(event, callback)
98
+ wrap_channel_owner(@channel_owner.once(event, callback))
99
+ end
100
+
101
+ # -- inherited from EventEmitter --
102
+ # @nodoc
103
+ def on(event, callback)
104
+ wrap_channel_owner(@channel_owner.on(event, callback))
105
+ end
88
106
  end
89
107
  end
@@ -218,17 +218,17 @@ module Playwright
218
218
  # > **NOTE** if `runBeforeUnload` is passed as true, a `beforeunload` dialog might be summoned
219
219
  # > and should be handled manually via [`event: Page.dialog`] event.
220
220
  def close(runBeforeUnload: nil)
221
- raise NotImplementedError.new('close is not implemented yet.')
221
+ wrap_channel_owner(@channel_owner.close(runBeforeUnload: runBeforeUnload))
222
222
  end
223
223
 
224
224
  # Gets the full HTML contents of the page, including the doctype.
225
225
  def content
226
- raise NotImplementedError.new('content is not implemented yet.')
226
+ wrap_channel_owner(@channel_owner.content)
227
227
  end
228
228
 
229
229
  # Get the browser context that the page belongs to.
230
230
  def context
231
- raise NotImplementedError.new('context is not implemented yet.')
231
+ wrap_channel_owner(@channel_owner.context)
232
232
  end
233
233
 
234
234
  # This method double clicks an element matching `selector` by performing the following steps:
@@ -365,7 +365,7 @@ module Playwright
365
365
  #
366
366
  # Shortcut for main frame's [`method: Frame.evaluate`].
367
367
  def evaluate(pageFunction, arg: nil)
368
- raise NotImplementedError.new('evaluate is not implemented yet.')
368
+ wrap_channel_owner(@channel_owner.evaluate(pageFunction, arg: arg))
369
369
  end
370
370
 
371
371
  # Returns the value of the `pageFunction` invocation as in-page object (JSHandle).
@@ -393,7 +393,7 @@ module Playwright
393
393
  # await resultHandle.dispose();
394
394
  # ```
395
395
  def evaluate_handle(pageFunction, arg: nil)
396
- raise NotImplementedError.new('evaluate_handle is not implemented yet.')
396
+ wrap_channel_owner(@channel_owner.evaluate_handle(pageFunction, arg: arg))
397
397
  end
398
398
 
399
399
  # The method adds a function called `name` on the `window` object of every frame in this page. When called, the function
@@ -533,7 +533,7 @@ module Playwright
533
533
  #
534
534
  # Shortcut for main frame's [`method: Frame.focus`].
535
535
  def focus(selector, timeout: nil)
536
- raise NotImplementedError.new('focus is not implemented yet.')
536
+ wrap_channel_owner(@channel_owner.focus(selector, timeout: timeout))
537
537
  end
538
538
 
539
539
  # Returns frame matching the specified criteria. Either `name` or `url` must be specified.
@@ -548,12 +548,12 @@ module Playwright
548
548
  # const frame = page.frame({ url: /.*domain.*/ });
549
549
  # ```
550
550
  def frame(frameSelector)
551
- raise NotImplementedError.new('frame is not implemented yet.')
551
+ wrap_channel_owner(@channel_owner.frame(frameSelector))
552
552
  end
553
553
 
554
554
  # An array of all frames attached to the page.
555
555
  def frames
556
- raise NotImplementedError.new('frames is not implemented yet.')
556
+ wrap_channel_owner(@channel_owner.frames)
557
557
  end
558
558
 
559
559
  # Returns element attribute value.
@@ -639,7 +639,7 @@ module Playwright
639
639
 
640
640
  # Indicates that the page has been closed.
641
641
  def closed?
642
- raise NotImplementedError.new('closed? is not implemented yet.')
642
+ wrap_channel_owner(@channel_owner.closed?)
643
643
  end
644
644
 
645
645
  # Returns whether the element is disabled, the opposite of [enabled](./actionability.md#enabled).
@@ -674,7 +674,7 @@ module Playwright
674
674
 
675
675
  # Returns the opener for popup pages and `null` for others. If the opener has been closed already the returns `null`.
676
676
  def opener
677
- raise NotImplementedError.new('opener is not implemented yet.')
677
+ wrap_channel_owner(@channel_owner.opener)
678
678
  end
679
679
 
680
680
  # Returns the PDF buffer.
@@ -778,7 +778,7 @@ module Playwright
778
778
  delay: nil,
779
779
  noWaitAfter: nil,
780
780
  timeout: nil)
781
- raise NotImplementedError.new('press is not implemented yet.')
781
+ wrap_channel_owner(@channel_owner.press(selector, key, delay: delay, noWaitAfter: noWaitAfter, timeout: timeout))
782
782
  end
783
783
 
784
784
  # Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
@@ -860,8 +860,9 @@ module Playwright
860
860
  end
861
861
 
862
862
  def set_content(html, timeout: nil, waitUntil: nil)
863
- raise NotImplementedError.new('set_content is not implemented yet.')
863
+ wrap_channel_owner(@channel_owner.set_content(html, timeout: timeout, waitUntil: waitUntil))
864
864
  end
865
+ alias_method :content=, :set_content
865
866
 
866
867
  # This setting will change the default maximum navigation time for the following methods and related shortcuts:
867
868
  # - [`method: Page.goBack`]
@@ -954,7 +955,7 @@ module Playwright
954
955
 
955
956
  # Returns the page's title. Shortcut for main frame's [`method: Frame.title`].
956
957
  def title
957
- raise NotImplementedError.new('title is not implemented yet.')
958
+ wrap_channel_owner(@channel_owner.title)
958
959
  end
959
960
 
960
961
  # Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text. `page.type` can be used to send
@@ -975,7 +976,7 @@ module Playwright
975
976
  delay: nil,
976
977
  noWaitAfter: nil,
977
978
  timeout: nil)
978
- raise NotImplementedError.new('type_text is not implemented yet.')
979
+ wrap_channel_owner(@channel_owner.type_text(selector, text, delay: delay, noWaitAfter: noWaitAfter, timeout: timeout))
979
980
  end
980
981
 
981
982
  # This method unchecks an element matching `selector` by performing the following steps:
@@ -1004,7 +1005,7 @@ module Playwright
1004
1005
 
1005
1006
  # Shortcut for main frame's [`method: Frame.url`].
1006
1007
  def url
1007
- raise NotImplementedError.new('url is not implemented yet.')
1008
+ wrap_channel_owner(@channel_owner.url)
1008
1009
  end
1009
1010
 
1010
1011
  # Video object associated with this page.
@@ -1020,8 +1021,8 @@ module Playwright
1020
1021
  #
1021
1022
  # Waits for event to fire and passes its value into the predicate function. Returns when the predicate returns truthy
1022
1023
  # value. Will throw an error if the page is closed before the event is fired.
1023
- def wait_for_event(event, optionsOrPredicate: nil)
1024
- raise NotImplementedError.new('wait_for_event is not implemented yet.')
1024
+ def wait_for_event(event, optionsOrPredicate: nil, &block)
1025
+ wrap_channel_owner(@channel_owner.wait_for_event(event, optionsOrPredicate: optionsOrPredicate, &wrap_block_call(block)))
1025
1026
  end
1026
1027
 
1027
1028
  # Returns when the `pageFunction` returns a truthy value. It resolves to a JSHandle of the truthy value.
@@ -1119,7 +1120,7 @@ module Playwright
1119
1120
  # await page.waitForRequest(request => request.url().searchParams.get('foo') === 'bar' && request.url().searchParams.get('foo2') === 'bar2');
1120
1121
  # ```
1121
1122
  def wait_for_request(urlOrPredicate, timeout: nil)
1122
- raise NotImplementedError.new('wait_for_request is not implemented yet.')
1123
+ wrap_channel_owner(@channel_owner.wait_for_request(urlOrPredicate, timeout: timeout))
1123
1124
  end
1124
1125
 
1125
1126
  # Returns the matched response.
@@ -1131,7 +1132,7 @@ module Playwright
1131
1132
  # return finalResponse.ok();
1132
1133
  # ```
1133
1134
  def wait_for_response(urlOrPredicate, timeout: nil)
1134
- raise NotImplementedError.new('wait_for_response is not implemented yet.')
1135
+ wrap_channel_owner(@channel_owner.wait_for_response(urlOrPredicate, timeout: timeout))
1135
1136
  end
1136
1137
 
1137
1138
  # Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
@@ -1188,14 +1189,32 @@ module Playwright
1188
1189
  raise NotImplementedError.new('workers is not implemented yet.')
1189
1190
  end
1190
1191
 
1192
+ # @nodoc
1193
+ def owned_context=(req)
1194
+ wrap_channel_owner(@channel_owner.owned_context=(req))
1195
+ end
1196
+
1191
1197
  # @nodoc
1192
1198
  def after_initialize
1193
1199
  wrap_channel_owner(@channel_owner.after_initialize)
1194
1200
  end
1195
1201
 
1202
+ # -- inherited from EventEmitter --
1196
1203
  # @nodoc
1197
- def owned_context=(req)
1198
- wrap_channel_owner(@channel_owner.owned_context=(req))
1204
+ def off(event, callback)
1205
+ wrap_channel_owner(@channel_owner.off(event, callback))
1206
+ end
1207
+
1208
+ # -- inherited from EventEmitter --
1209
+ # @nodoc
1210
+ def once(event, callback)
1211
+ wrap_channel_owner(@channel_owner.once(event, callback))
1212
+ end
1213
+
1214
+ # -- inherited from EventEmitter --
1215
+ # @nodoc
1216
+ def on(event, callback)
1217
+ wrap_channel_owner(@channel_owner.on(event, callback))
1199
1218
  end
1200
1219
  end
1201
1220
  end