Sha256: 89790ae887c75ff9432be4a62d9364837498ab055171cbe4986c0a5da10e7440
Contents?: true
Size: 720 Bytes
Versions: 19
Compression:
Stored size: 720 Bytes
Contents
# frozen_string_literal: true require 'capybara/selector/filters/base' module Capybara class Selector module Filters class LocatorFilter < NodeFilter def initialize(block, **options) super(nil, nil, block, options) end def matches?(node, value, context = nil, exact:) apply(node, value, true, context, exact: exact, format: context&.default_format) rescue Capybara::ElementNotFound false end private def apply(subject, value, skip_value, ctx, **options) return skip_value if skip?(value) filter_context(ctx).instance_exec(subject, value, **options, &@block) end end end end end
Version data entries
19 entries across 19 versions & 3 rubygems