Class: Postpone::Invoke

Inherits:
Object
  • Object
show all
Defined in:
lib/postpone/invoke.rb

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Invoke

Returns a new instance of Invoke.



8
9
10
# File 'lib/postpone/invoke.rb', line 8

def initialize(object)
  @object = object
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/postpone/invoke.rb', line 12

def method_missing(method, *args)
  !! Stalker.enqueue("postpone.worker", {
    method: method,
    args: Marshal.dump(args),
    object: Marshal.dump(@object)
  })
end