class EmojiDiffer::Config
Attributes
cache_location[W]
token[W]
Public Class Methods
new()
click to toggle source
# File lib/emoji_differ/config.rb, line 5 def initialize @token = nil @cache_location = nil end
Public Instance Methods
cache_location()
click to toggle source
# File lib/emoji_differ/config.rb, line 18 def cache_location @cache_location || ENV['EMOJI_CACHE_LOCATION'] || 'emoji_cache' end
read_token_file()
click to toggle source
# File lib/emoji_differ/config.rb, line 10 def read_token_file @file_token ||= File.exists?('.slack_token') ? File.read('.slack_token') : nil end
token()
click to toggle source
# File lib/emoji_differ/config.rb, line 14 def token @token || ENV['SLACK_API_TOKEN'] || read_token_file end