Class: Responders::Reset

Inherits:
ApplicationResponder show all
Defined in:
lib/generators/bot/install/templates/reset_responder.rb

Instance Attribute Summary

Attributes inherited from Bot::Responder

#analytics, #chat_context, #handler, #message, #responses, #user, #user_context

Instance Method Summary collapse

Methods inherited from Bot::Responder

#can_respond_to_type?, #initialize, respond_to

Constructor Details

This class inherits a constructor from Bot::Responder

Instance Method Details

#can_handle?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/generators/bot/install/templates/reset_responder.rb', line 3

def can_handle?
  match_message("Reset!")
end

#handleObject



7
8
9
10
# File 'lib/generators/bot/install/templates/reset_responder.rb', line 7

def handle
  user.destroy
  text_response('Resetting..')
end