Module: Legion::Extensions::Actors::Every

Defined in:
lib/legion/extensions/actors/every.rb

Instance Method Summary collapse

Instance Method Details

#actionObject



15
16
17
# File 'lib/legion/extensions/actors/every.rb', line 15

def action
  Legion::Logging.warn 'An extension is using the default block from Legion::Extensions::Runners::Every'
end

#cancelObject



19
20
21
# File 'lib/legion/extensions/actors/every.rb', line 19

def cancel
  @timer.cancel
end

#initializeObject



5
6
7
8
9
# File 'lib/legion/extensions/actors/every.rb', line 5

def initialize
  @timer = Celluloid.every(time) do
    timer_method
  end
end

#timeObject



11
12
13
# File 'lib/legion/extensions/actors/every.rb', line 11

def time
  10
end