Module: JobIteration::Iteration::ClassMethods

Defined in:
lib/job-iteration/iteration.rb

Instance Method Summary collapse

Instance Method Details

#around_iterate(&blk) ⇒ Object



74
75
76
# File 'lib/job-iteration/iteration.rb', line 74

def around_iterate(&blk)
  set_callback(:iterate, :around, &blk)
end

#method_added(method_name) ⇒ Object



57
58
59
60
# File 'lib/job-iteration/iteration.rb', line 57

def method_added(method_name)
  ban_perform_definition if method_name.to_sym == :perform
  super
end

#on_complete(*filters, &blk) ⇒ Object



70
71
72
# File 'lib/job-iteration/iteration.rb', line 70

def on_complete(*filters, &blk)
  set_callback(:complete, :after, *filters, &blk)
end

#on_shutdown(*filters, &blk) ⇒ Object



66
67
68
# File 'lib/job-iteration/iteration.rb', line 66

def on_shutdown(*filters, &blk)
  set_callback(:shutdown, :after, *filters, &blk)
end

#on_start(*filters, &blk) ⇒ Object



62
63
64
# File 'lib/job-iteration/iteration.rb', line 62

def on_start(*filters, &blk)
  set_callback(:start, :after, *filters, &blk)
end