Module: Pavlov::Operation::ClassMethods

Defined in:
lib/pavlov/operation.rb,
lib/pavlov/alpha_compatibility.rb

Instance Method Summary collapse

Instance Method Details

#arguments(*args) ⇒ Object



61
62
63
64
65
66
67
68
69
# File 'lib/pavlov/alpha_compatibility.rb', line 61

def arguments(*args)
  # Add generic attribute for each argument
  args.each do |argument|
    attribute argument, Object
  end

  # Add attribute for pavlov_options
  attribute :pavlov_options, Hash, default: {}
end

#perform(*args) ⇒ Object

make our interactors behave as Resque jobs



55
56
57
# File 'lib/pavlov/operation.rb', line 55

def perform(*args)
  new(*args).call
end

#queueObject



59
60
61
# File 'lib/pavlov/operation.rb', line 59

def queue
  @queue || :interactor_operations
end