Module: ActiveInteraction::Missable
- Extended by:
- ActiveSupport::Concern
- Included in:
- ArrayFilter, Base, HashFilter
- Defined in:
- lib/active_interaction/concerns/missable.rb
Overview
Handle common ‘method_missing` functionality.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(slug, *args) {|klass, args, options| ... } ⇒ Missable (private)
21 22 23 24 25 26 27 28 29 |
# File 'lib/active_interaction/concerns/missable.rb', line 21 def method_missing(slug, *args) return super unless (klass = filter(slug)) = args.last.is_a?(Hash) ? args.pop : {} yield(klass, args, ) if block_given? self end |