Class: CapybaraSelenium::Server::Configurator
- Inherits:
-
Object
- Object
- CapybaraSelenium::Server::Configurator
- Defined in:
- lib/capybara_selenium/server/configurator.rb
Direct Known Subclasses
AppServer::BaseConfigurator, CapybaraSelenium::SeleniumServer::BaseConfigurator
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #configure(&block) ⇒ Object
-
#initialize(config) ⇒ Configurator
constructor
A new instance of Configurator.
- #method_missing(method, *args, &_) ⇒ Object
Constructor Details
#initialize(config) ⇒ Configurator
Returns a new instance of Configurator.
6 7 8 |
# File 'lib/capybara_selenium/server/configurator.rb', line 6 def initialize(config) @config = config end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &_) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/capybara_selenium/server/configurator.rb', line 15 def method_missing(method, *args, &_) if @config.respond_to? method if method =~ /(.*)=/ return @config.send method, args.first else return @config.send method end else fail end end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
4 5 6 |
# File 'lib/capybara_selenium/server/configurator.rb', line 4 def config @config end |
Instance Method Details
#configure(&block) ⇒ Object
10 11 12 13 |
# File 'lib/capybara_selenium/server/configurator.rb', line 10 def configure(&block) @config = create_config block.call @config end |