lib/slack-ruby-bot/config.rb in slack-ruby-bot-0.4.1 vs lib/slack-ruby-bot/config.rb in slack-ruby-bot-0.4.2
- old
+ new
@@ -2,12 +2,20 @@
module Config
extend self
attr_accessor :token
attr_accessor :url
+ attr_accessor :aliases
attr_accessor :user
attr_accessor :user_id
attr_accessor :team
attr_accessor :team_id
- attr_accessor :secret
+
+ def names
+ [user, aliases].compact.flatten
+ end
+
+ def name?(name)
+ name && names.include?(name.downcase)
+ end
end
end