module Slack::Configurable
Attributes
api_endpoint[RW]
connection_options[RW]
default_channel[RW]
default_media_type[RW]
icon_url[RW]
middleware[RW]
team[RW]
token[RW]
user_agent[RW]
username[RW]
Public Class Methods
keys()
click to toggle source
List of configurable keys for {Octokit::Client} @return [Array] of option keys
# File lib/slack/configurable.rb, line 13 def keys @keys ||= [ :token, :team, :username, :icon_url, :api_endpoint, :user_agent, :connection_options, :default_media_type, :default_channel, :middleware ] end
Public Instance Methods
configure() { |self| ... }
click to toggle source
Set configuration options using a block
# File lib/slack/configurable.rb, line 30 def configure yield self end
reset!()
click to toggle source
Reset configuration options to default values
# File lib/slack/configurable.rb, line 35 def reset! Slack::Configurable.keys.each do |key| instance_variable_set(:"@#{key}", Slack::Default.options[key]) end self end
Also aliased as: setup
Private Instance Methods
options()
click to toggle source
# File lib/slack/configurable.rb, line 45 def options Hash[Slack::Configurable.keys.map{|key| [key, instance_variable_get(:"@#{key}")]}] end