Module: Capybara::AsyncRunner::Registry
- Defined in:
- lib/capybara/async_runner/registry.rb
Overview
Module for storing all defined commands
You don’t need to use this class directly, the gme does everything for you
Class Method Summary collapse
-
.<<(command_klass) ⇒ Object
Stores provided
command_klass
internally. -
.[](command_name) ⇒ Object
Returns first stored command that has provided
command_name
.
Class Method Details
.<<(command_klass) ⇒ Object
Stores provided command_klass
internally
15 16 17 |
# File 'lib/capybara/async_runner/registry.rb', line 15 def self.<<(command_klass) all << command_klass end |
.[](command_name) ⇒ Object
Returns first stored command that has provided command_name
23 24 25 |
# File 'lib/capybara/async_runner/registry.rb', line 23 def self.[](command_name) all.detect { |klass| klass.command_name.to_s == command_name.to_s } end |