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'


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

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

Instance Attribute Details

#api_tokenObject

(Optional) Should be set if an API token hasn’t be set on the Hey module.



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

def api_token
  @api_token
end