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