Module: Capybara::AsyncRunner::Commands::Responders::ClassMethods
- Defined in:
- lib/capybara/async_runner/commands/responders.rb
Constant Summary collapse
- BLANK_PROXY =
proc { |value| value }
Instance Method Summary collapse
- #responders ⇒ Object
-
#response(method_name, options = {}) { ... } ⇒ Object
Defines a responder for script.
Instance Method Details
#responders ⇒ Object
38 39 40 |
# File 'lib/capybara/async_runner/commands/responders.rb', line 38 def responders store[:responders] ||= {} end |
#response(method_name, options = {}) { ... } ⇒ Object
Defines a responder for script
raw_data will be returned if no block provided
53 54 55 56 57 58 59 |
# File 'lib/capybara/async_runner/commands/responders.rb', line 53 def response(method_name, = {}, &block) mapping = { options: , processor: block || BLANK_PROXY } responders[method_name] = mapping end |