Class: Lita::Handlers::DeleteTeam

Inherits:
Handler
  • Object
show all
Defined in:
lib/lita/handlers/delete_team.rb

Instance Method Summary collapse

Instance Method Details

#delete(response) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/lita/handlers/delete_team.rb', line 13

def delete(response)
  team_name = response.match_data[2]
  if redis.exists(team_name)
    redis.del(team_name)
    response.reply(render_template(:team_deleted, team_name: team_name))
  else
    response.reply(render_template(:team_not_found, team_name: team_name))
  end
end