lib/ably/modules/message_emitter.rb in ably-0.7.5 vs lib/ably/modules/message_emitter.rb in ably-0.7.6

- old
+ new

@@ -4,11 +4,11 @@ # Message emitter, subscriber and unsubscriber (Pub/Sub) functionality common to Channels and Presence # In addition to standard Pub/Sub functionality, it allows subscribers to subscribe to :all. module MessageEmitter # Subscribe to events on this object # - # @param name [String,Symbol] Optional, the event name to subscribe to. Defaults to `:all` events + # @param names [String,Symbol] Optional, the event name(s) to subscribe to. Defaults to `:all` events # @yield [Object] For each event, the provided block is called with the event payload object # # @return [void] # def subscribe(*names, &callback) @@ -20,10 +20,10 @@ end # Unsubscribe the matching block for events on the this object. # If a block is not provided, all subscriptions will be unsubscribed # - # @param name [String,Symbol] Optional, the event name to unsubscribe from. Defaults to `:all` events + # @param names [String,Symbol] Optional, the event name(s) to unsubscribe from. Defaults to `:all` events # # @return [void] # def unsubscribe(*names, &callback) names = :all unless names && !names.empty?