Module: MimeActor::Dispatcher

Defined in:
lib/mime_actor/dispatcher.rb

Defined Under Namespace

Classes: InstanceExec, MethodCall

Class Method Summary collapse

Class Method Details

.build(callable, *args) ⇒ Object



56
57
58
59
60
61
62
63
# File 'lib/mime_actor/dispatcher.rb', line 56

def self.build(callable, *args)
  case callable
  when String, Symbol
    MethodCall.new(callable, *args)
  when Proc
    InstanceExec.new(callable, *args)
  end
end