Method: Fancybox2::Module::Base#on_stop

Defined in:
lib/fancybox2/module/base.rb

#on_stop(&block) ⇒ Object



201
202
203
204
205
206
207
208
209
# File 'lib/fancybox2/module/base.rb', line 201

def on_stop(&block)
  if block_given?
    @on_stop = block
    return
  end
  @on_stop.call if @on_stop
  @status = :stopped
  # Stop code execution, but keep broker connection and continue to send alive
end