Class: Hey::Dispatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/hey/dispatcher.rb

Direct Known Subclasses

Subscriber, Yo

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Dispatcher

Optionally accepts a hash containing an API token. Defaults to the API token set on the Hey module.

Hey::Yo.new api_token: '3858f62230ac3c915f300c664312c63f'


14
15
16
# File 'lib/hey/dispatcher.rb', line 14

def initialize options = {}
  @api_token = options[:api_token]
end

Instance Attribute Details

#api_tokenObject

Returns the API token to be used when making requests. This will either be the api_token set on initialization or the token set on the Hey module itself.



8
9
10
# File 'lib/hey/dispatcher.rb', line 8

def api_token
  @api_token
end