Module: Capybara::UI::WidgetClass

Defined in:
lib/capybara/ui/widgets/widget_class.rb

Class Method Summary collapse

Class Method Details

.new(selector, parent = Widget, &extensions) ⇒ Object


4
5
6
7
8
9
10
# File 'lib/capybara/ui/widgets/widget_class.rb', line 4

def self.new(selector, parent = Widget, &extensions)
  klass = Class.new(parent) { root selector }

  klass.class_eval(&extensions) if block_given?

  klass
end