Class: Tabulatr::Finder::Invoker
- Inherits:
-
Object
- Object
- Tabulatr::Finder::Invoker
- Defined in:
- lib/tabulatr/tabulatr/finder.rb
Instance Method Summary collapse
-
#initialize(batch_action, ids) ⇒ Invoker
constructor
A new instance of Invoker.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(batch_action, ids) ⇒ Invoker
Returns a new instance of Invoker.
42 43 44 45 |
# File 'lib/tabulatr/tabulatr/finder.rb', line 42 def initialize(batch_action, ids) @batch_action = batch_action.to_sym @ids = ids end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
47 48 49 50 51 |
# File 'lib/tabulatr/tabulatr/finder.rb', line 47 def method_missing(name, *args, &block) if @batch_action == name yield(@ids, args) end end |