Module: EDI::Configuration

Included in:
EDI
Defined in:
lib/edi/configuration.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/edi/configuration.rb', line 6

def self.included(base)
  base.include ActiveSupport::Configurable
  base.configure do |config|
    # Bot Name
    config.bot_name = "EDI"

    # These messages can be overridden in the Application configuration. If an array of strings are provided,
    # a random one will be selected
    config.hello_message = "Hello, I'm #{config.bot_name}"
    config.default_response = "What is this, I don't even"
    config.unfit_environment_response = "I'm really sorry, but that service needs to be configured"
    config.third_party_api_failure_respone = "Most unfortunately, that service is not working right now."
    config.standard_error_response = "I'm sorry, Something went wrong."

    # Autoload Services
    config.autoload_paths = ["bot/services"]

    # Postable Configuration
    config.default_channel = "#general"
  end
end