Class: Capybara::RegistrationContainer Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/capybara/registration_container.rb |
Class Method Summary
- .new ⇒ RegistrationContainer constructor private Internal use only
Instance Method Summary
- #[](name) Internal use only
- #[]=(name, value) Internal use only
- #method_missing(method_name) Internal use only
- #names Internal use only
- #respond_to_missing?(method_name, include_all) ⇒ Boolean Internal use only
- #register(name, block) private Internal use only
Constructor Details
.new ⇒ RegistrationContainer
(private)
# File 'lib/capybara/registration_container.rb', line 33
def initialize @registered = {} end
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name)
[ GitHub ]# File 'lib/capybara/registration_container.rb', line 19
def method_missing(method_name, ...) if @registered.respond_to?(method_name) Capybara::Helpers.warn "DEPRECATED: Calling '#{method_name}' on the drivers/servers container is deprecated without replacement" return @registered.public_send(method_name, ...) end super end
Instance Method Details
#[](name)
[ GitHub ]# File 'lib/capybara/registration_container.rb', line 10
def [](name) @registered[name] end
#[]=(name, value)
[ GitHub ]#names
[ GitHub ]# File 'lib/capybara/registration_container.rb', line 6
def names @registered.keys end
#register(name, block) (private)
[ GitHub ]# File 'lib/capybara/registration_container.rb', line 37
def register(name, block) @registered[name] = block end
#respond_to_missing?(method_name, include_all) ⇒ Boolean
# File 'lib/capybara/registration_container.rb', line 27
def respond_to_missing?(method_name, include_all) @registered.respond_to?(method_name) || super end