module Cabin::Publisher
This mixin allows you to easily give channel and publish features to a class.
Public Instance Methods
Source
# File lib/cabin/publisher.rb, line 12 def channel return @channel end
Get the channel
Source
# File lib/cabin/publisher.rb, line 7 def channel=(channel) @channel = channel end
Set the channel
Source
# File lib/cabin/publisher.rb, line 17 def publish(object) @channel << object end
Publish to the channel