Class: 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.
56 57 58 59 |
# File 'lib/tabulatr/tabulatr/finder.rb', line 56 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
61 62 63 64 65 |
# File 'lib/tabulatr/tabulatr/finder.rb', line 61 def method_missing(name, *args, &block) if @batch_action == name yield(@ids) end end |