Module: DefaultRspecToBrowser
- Defined in:
- lib/rspec/default_rspec_to_browser.rb
Overview
Currently not in use. Should go in its own file, too.
Instance Method Summary collapse
-
#method_missing(method, *args, &block) ⇒ Object
rubocop:disable Style/MethodMissingSuper.
-
#respond_to_missing?(method, _include_private = false) ⇒ Boolean
rubocop:enable Style/MethodMissingSuper.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
rubocop:disable Style/MethodMissingSuper
7 8 9 10 11 12 13 14 15 |
# File 'lib/rspec/default_rspec_to_browser.rb', line 7 def method_missing(method, *args, &block) if args.empty? browser.send(method) else browser.send(method, *args, &block) end rescue ArgumentError browser.send(method) end |
Instance Method Details
#respond_to_missing?(method, _include_private = false) ⇒ Boolean
rubocop:enable Style/MethodMissingSuper
18 19 20 21 |
# File 'lib/rspec/default_rspec_to_browser.rb', line 18 def respond_to_missing?(method, _include_private = false) return false if method =~ /browser/ browser.respond_to?(method) end |