Class: Prickle::Capybara::Popup

Inherits:
Object
  • Object
show all
Defined in:
lib/prickle/capybara/popup.rb

Instance Method Summary collapse

Constructor Details

#initializePopup

Returns a new instance of Popup.



8
9
10
11
# File 'lib/prickle/capybara/popup.rb', line 8

def initialize
  return @base = Popups::Webkit.new if ::Capybara.current_driver == :webkit or ::Capybara.javascript_driver == :webkit
  @base = Popups::Selenium.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/prickle/capybara/popup.rb', line 14

def method_missing method, *args, &block
  if @base.respond_to? method
    @base.send method, *args, &block
  else
    super
  end

end