Module: ResourceSubscriber::Publishable

Extended by:
ActiveSupport::Concern
Defined in:
lib/resource_subscriber/publishable.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#publish_createdObject



22
23
24
# File 'lib/resource_subscriber/publishable.rb', line 22

def publish_created
  self.resource_publisher.publish_resource_message('created', self)
end

#publish_destroyedObject



26
27
28
# File 'lib/resource_subscriber/publishable.rb', line 26

def publish_destroyed
  self.resource_publisher.publish_resource_message('destroyed', self)
end

#publish_updatedObject



30
31
32
# File 'lib/resource_subscriber/publishable.rb', line 30

def publish_updated
  self.resource_publisher.publish_resource_message('updated', self)
end