Sha256: 3713968ef8bf4b23b7f0cb30875013b171e18e77551bda6818ab5bd95f9a2cff
Contents?: true
Size: 825 Bytes
Versions: 5
Compression:
Stored size: 825 Bytes
Contents
# frozen_string_literal: true require 'capybara/selector/filter' module Capybara class Selector class ExpressionFilter < Filter undef_method :matches? def apply_filter(expr, value) return expr if skip?(value) if !valid_value?(value) msg = "Invalid value #{value.inspect} passed to expression filter #{@name} - " if default? warn msg + "defaulting to #{default}" value = default else warn msg + "skipping" return expr end end @block.call(expr, value) end end class IdentityExpressionFilter < ExpressionFilter def initialize end def default? false end def apply_filter(expr, _value) return expr end end end end
Version data entries
5 entries across 5 versions & 2 rubygems