Class: Capybara::Playwright::DialogEventHandler::Item
- Inherits:
-
Object
- Object
- Capybara::Playwright::DialogEventHandler::Item
- Defined in:
- lib/capybara/playwright/dialog_event_handler.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #call(dialog) ⇒ Object
-
#initialize(dialog_proc) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(dialog_proc) ⇒ Item
Returns a new instance of Item.
8 9 10 11 |
# File 'lib/capybara/playwright/dialog_event_handler.rb', line 8 def initialize(dialog_proc) @id = SecureRandom.uuid @proc = dialog_proc end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
13 14 15 |
# File 'lib/capybara/playwright/dialog_event_handler.rb', line 13 def id @id end |
Instance Method Details
#call(dialog) ⇒ Object
15 16 17 |
# File 'lib/capybara/playwright/dialog_event_handler.rb', line 15 def call(dialog) @proc.call(dialog) end |