Module: Pharos

Extended by:
Forwardable
Defined in:
lib/pharos.rb,
lib/pharos/client.rb,
lib/pharos/channel.rb

Overview

Used for configuring API credentials and creating Channel objects

Defined Under Namespace

Classes: AuthenticationError, Channel, Client, ConfigurationError, Error, HTTPError

Class Method Summary collapse

Class Method Details

.[](channel_name) ⇒ Channel

Return a channel by name

Examples:

Pharos['my-channel']

Raises:



28
29
30
31
32
33
34
# File 'lib/pharos.rb', line 28

def [](channel_name)
  begin
    default_client[channel_name]
  rescue ConfigurationError
    raise ConfigurationError, 'Missing configuration: please check that Pharos.secret is configured.'
  end
end