This method is deprecated or moved on the latest stable version.
The last existing version (v4.1.8) is shown here.
match_condition(value, condition)
private
Match the given value to the given condition.
# File actionview/lib/action_view/vendor/html-scanner/html/node.rb, line 515
def match_condition(value, condition)
case condition
when String
value && value == condition
when Regexp
value && value.match(condition)
when Numeric
value == condition.to_s
when true
!value.nil?
when false, nil
value.nil?
else
false
end
end