Class: ActiveInteraction::Extras::Filters::AnythingFilter
- Inherits:
-
Filter
- Object
- Filter
- ActiveInteraction::Extras::Filters::AnythingFilter
- Defined in:
- lib/active_interaction/extras/filters/anything_filter.rb
Instance Method Summary collapse
Instance Method Details
#matches?(value) ⇒ Boolean
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/active_interaction/extras/filters/anything_filter.rb', line 6 def matches?(value) if value == nil && default? # as per v5 there is no way to know if value of `nil` is given by caller or # is a default value when it's missing. We want to maintain standard default # behaviour when value is `nil`. Returning `false` will trigger default value false else true end end |