Sha256: 0f0a99513f77fb34343290fceb8060929b394d4ffa959fe9f04467b493baf9b4
Contents?: true
Size: 463 Bytes
Versions: 1
Compression:
Stored size: 463 Bytes
Contents
module Yaps module Subscriber extend ActiveSupport::Concern module ClassMethods def subscribe(event, opts) options = opts.clone puts subscribe_instance.object_id Wisper.add_listener(subscribe_instance, on: event, with: options[:with]) nil end def subscribe_instance @subscribe_instance ||= self.new end def available_options [:on, :with].freeze end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yaps-0.0.1 | lib/yaps/subscriber.rb |