Module: SlackRubyBot::Config
Instance Attribute Summary collapse
-
#aliases ⇒ Object
Returns the value of attribute aliases.
-
#team ⇒ Object
Returns the value of attribute team.
-
#team_id ⇒ Object
Returns the value of attribute team_id.
-
#token ⇒ Object
Returns the value of attribute token.
-
#url ⇒ Object
Returns the value of attribute url.
-
#user ⇒ Object
Returns the value of attribute user.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Instance Method Summary collapse
Instance Attribute Details
#aliases ⇒ Object
Returns the value of attribute aliases.
7 8 9 |
# File 'lib/slack-ruby-bot/config.rb', line 7 def aliases @aliases end |
#team ⇒ Object
Returns the value of attribute team.
10 11 12 |
# File 'lib/slack-ruby-bot/config.rb', line 10 def team @team end |
#team_id ⇒ Object
Returns the value of attribute team_id.
11 12 13 |
# File 'lib/slack-ruby-bot/config.rb', line 11 def team_id @team_id end |
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/slack-ruby-bot/config.rb', line 5 def token @token end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/slack-ruby-bot/config.rb', line 6 def url @url end |
#user ⇒ Object
Returns the value of attribute user.
8 9 10 |
# File 'lib/slack-ruby-bot/config.rb', line 8 def user @user end |
#user_id ⇒ Object
Returns the value of attribute user_id.
9 10 11 |
# File 'lib/slack-ruby-bot/config.rb', line 9 def user_id @user_id end |
Instance Method Details
#name?(name) ⇒ Boolean
17 18 19 |
# File 'lib/slack-ruby-bot/config.rb', line 17 def name?(name) name && names.include?(name.downcase) end |
#names ⇒ Object
13 14 15 |
# File 'lib/slack-ruby-bot/config.rb', line 13 def names [user, aliases, "<@#{user_id.downcase}>", "<@#{user_id.downcase}>:"].compact.flatten end |