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.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(slug, *args) {|klass, args, options| ... } ⇒ Missable
19 20 21 22 23 24 25 26 27 |
# File 'lib/active_interaction/concerns/missable.rb', line 19 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 |