Module: SlackRubyBot::Config
Constant Summary collapse
- ATTRS =
i[token url aliases user user_id team team_id send_gifs logger].freeze
Instance Method Summary collapse
- #allow_bot_messages? ⇒ Boolean
- #allow_message_loops? ⇒ Boolean
- #reset! ⇒ Object
- #send_gifs? ⇒ Boolean
Instance Method Details
#allow_bot_messages? ⇒ Boolean
10 11 12 |
# File 'lib/slack-ruby-bot/config.rb', line 10 def !! end |
#allow_message_loops? ⇒ Boolean
14 15 16 |
# File 'lib/slack-ruby-bot/config.rb', line 14 def !! end |
#reset! ⇒ Object
25 26 27 |
# File 'lib/slack-ruby-bot/config.rb', line 25 def reset! ATTRS.each { |attr| send("#{attr}=", nil) } end |
#send_gifs? ⇒ Boolean
18 19 20 21 22 23 |
# File 'lib/slack-ruby-bot/config.rb', line 18 def send_gifs? return false unless defined?(Giphy) v = boolean_from_env('SLACK_RUBY_BOT_SEND_GIFS') send_gifs.nil? ? (v.nil? || v) : send_gifs end |