Class: Capybara::Selector::Filters::LocatorFilter
- Inherits:
-
NodeFilter
- Object
- Base
- NodeFilter
- Capybara::Selector::Filters::LocatorFilter
- Defined in:
- lib/capybara/selector/filters/locator_filter.rb
Instance Method Summary collapse
-
#initialize(block, **options) ⇒ LocatorFilter
constructor
A new instance of LocatorFilter.
- #matches?(node, value, context = nil, exact:) ⇒ Boolean
Methods inherited from Base
#boolean?, #default, #default?, #format, #handles_option?, #matcher?, #skip?
Constructor Details
#initialize(block, **options) ⇒ LocatorFilter
Returns a new instance of LocatorFilter.
9 10 11 |
# File 'lib/capybara/selector/filters/locator_filter.rb', line 9 def initialize(block, **) super(nil, nil, block, **) end |
Instance Method Details
#matches?(node, value, context = nil, exact:) ⇒ Boolean
13 14 15 16 17 |
# File 'lib/capybara/selector/filters/locator_filter.rb', line 13 def matches?(node, value, context = nil, exact:) apply(node, value, true, context, exact: exact, format: context&.default_format) rescue Capybara::ElementNotFound false end |