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
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 |
#queue ⇒ Object
59 60 61 |
# File 'lib/pavlov/operation.rb', line 59 def queue @queue || :interactor_operations end |