Class: Tabulatr::Finder::Invoker

Inherits:
Object
  • Object
show all
Defined in:
lib/tabulatr/tabulatr/finder.rb

Instance Method Summary collapse

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