Class: ActiveInteraction::AbstractNumericFilter
- Defined in:
- lib/active_interaction/filters/abstract_numeric_filter.rb
Overview
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Filter
Instance Method Summary collapse
Methods inherited from Filter
#clean, #default, factory, #has_default?, inherited, #initialize, slug
Constructor Details
This class inherits a constructor from ActiveInteraction::Filter
Instance Method Details
#cast(value) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/active_interaction/filters/abstract_numeric_filter.rb', line 4 def cast(value) case value when klass value when Numeric, String begin send(klass.name, value) rescue ArgumentError super end else super end end |