Class: Capybara::Playwright::DialogEventHandler::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/capybara/playwright/dialog_event_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject (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