Module: Pavlov::Operation::ClassMethods
- Defined in:
- lib/pavlov/operation.rb,
lib/pavlov/alpha_compatibility.rb
Instance Method Summary collapse
- #arguments(*args) ⇒ Object
-
#perform(*args) ⇒ Object
make our interactors behave as Resque jobs.
- #queue ⇒ Object
Instance Method Details
#arguments(*args) ⇒ Object
67 68 69 70 71 72 73 74 75 |
# File 'lib/pavlov/alpha_compatibility.rb', line 67 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
48 49 50 |
# File 'lib/pavlov/operation.rb', line 48 def perform(*args) new(*args).call end |
#queue ⇒ Object
52 53 54 |
# File 'lib/pavlov/operation.rb', line 52 def queue @queue || :interactor_operations end |