Skip to content
Browse files

This feels overly pedantic

  • Loading branch information...
1 parent ceb2f5d commit ef3ce8b3ed2d3c3efc2c293fc45d2ef1c806169c @mloughran mloughran committed Nov 12, 2012
Showing with 1 addition and 16 deletions.
  1. +1 −16 lib/pusher.rb
View
17 lib/pusher.rb
@@ -31,25 +31,10 @@ class << self
def_delegators :default_client, :get, :get_async, :post, :post_async
def_delegators :default_client, :channels, :channel_info, :trigger, :trigger_async
- def_delegators :default_client, :webhook, :channel
+ def_delegators :default_client, :webhook, :channel, :[]
attr_writer :logger
- # Return a channel by name
- #
- # @example
- # Pusher['my-channel']
- # @return [Channel]
- # @raise [ConfigurationError] unless key, secret and app_id have been
- # configured
- def [](channel_name)
- begin
- default_client[channel_name]
- rescue ConfigurationError
- raise ConfigurationError, 'Missing configuration: please check that Pusher.key, Pusher.secret and Pusher.app_id are configured.'
- end
- end
-
def logger
@logger ||= begin
log = Logger.new($stdout)

0 comments on commit ef3ce8b

Please sign in to comment.
Something went wrong with that request. Please try again.