Class: Lita::Handlers::Users
- Inherits:
-
Object
- Object
- Lita::Handlers::Users
- Extended by:
- Lita::Handler::ChatRouter
- Defined in:
- lib/lita/handlers/users.rb
Overview
Provides information on Lita users.
Instance Method Summary collapse
-
#find(response) ⇒ void
Outputs the name, ID, and mention name of a user matching the search query.
Methods included from Lita::Handler::ChatRouter
dispatch, dispatch_to_route, extended, route, routes
Instance Method Details
#find(response) ⇒ void
This method returns an undefined value.
Outputs the name, ID, and mention name of a user matching the search query.
15 16 17 18 19 20 21 22 23 |
# File 'lib/lita/handlers/users.rb', line 15 def find(response) user = Lita::User.fuzzy_find(response.args[1]) if user response.reply(formatted_user(user)) else response.reply(t("find_empty_state")) end end |