Class: Envoy
- Inherits:
-
Object
- Object
- Envoy
- Defined in:
- lib/util/util.rb
Overview
Others will be derived from it
Direct Known Subclasses
AmazonAlexa, FacebookMessenger, Generic, GoogleAssistant, SlackEventApi, SlackRTMApi
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Envoy
constructor
A new instance of Envoy.
Constructor Details
#initialize(params = {}) ⇒ Envoy
Returns a new instance of Envoy.
56 57 58 59 60 61 62 |
# File 'lib/util/util.rb', line 56 def initialize(params = {}) @debug = params.fetch(:debug, false) @token = params.fetch(:token, nil) raise ArgumentError.new 'Token can not be nil or empty' if @token.nil? || @token.to_s.empty? @base_url = params.fetch(:base_url, "https://api.botanalytics.co/v1/") @callback = params.fetch(:callback, nil) end |