Module: Mongoid::Publishable::Callbacks::InstanceMethods

Defined in:
lib/mongoid/publishable/callbacks.rb

Instance Method Summary collapse

Instance Method Details

#process_after_publish_callbacksObject

process the callbacks



54
55
56
# File 'lib/mongoid/publishable/callbacks.rb', line 54

def process_after_publish_callbacks
  self.class.after_publish_callbacks.process(self)
end

#run_after_publish_callbacksObject

set to run the callbacks after save



59
60
61
# File 'lib/mongoid/publishable/callbacks.rb', line 59

def run_after_publish_callbacks
  @run_after_publish_callbacks = true
end

#run_after_publish_callbacks?Boolean

returns whether the object has just been published

Returns:

  • (Boolean)


64
65
66
# File 'lib/mongoid/publishable/callbacks.rb', line 64

def run_after_publish_callbacks?
  !!@run_after_publish_callbacks
end