class Slappy::Configuration

Attributes

lib_dir_path[RW]
logger[RW]
robot[RW]
scripts_dir_path[RW]
stop_with_error[RW]
token[RW]

Public Class Methods

new() click to toggle source
# File lib/slappy/configuration.rb, line 5
def initialize
  @robot = Robot.new
end

Public Instance Methods

config_file_path() click to toggle source
# File lib/slappy/configuration.rb, line 26
def config_file_path
  './slappy_config.rb'
end
dsl() click to toggle source
# File lib/slappy/configuration.rb, line 38
def dsl
  @dsl ||= :enabled
end
dsl=(symbol) click to toggle source
# File lib/slappy/configuration.rb, line 42
def dsl=(symbol)
  fail ArgumentError unless [:enabled, :disabled].include? symbol
  @dsl = symbol
end
send_params() click to toggle source
# File lib/slappy/configuration.rb, line 47
def send_params
  {
    username: robot.username,
    icon_emoji: robot.icon_emoji,
    channel: robot.channel,
    icon_url: robot.icon_url,
    as_user: robot.as_user
  }
end