Class: Lita::Commands::EmptyGroups

Inherits:
Object
  • Object
show all
Defined in:
lib/lita/commands/empty_groups.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



6
7
8
# File 'lib/lita/commands/empty_groups.rb', line 6

def name
  'empty-groups'
end

#run(robot, target, gateway, opts = {}) ⇒ Object



10
11
12
13
14
# File 'lib/lita/commands/empty_groups.rb', line 10

def run(robot, target, gateway, opts = {})
  msg = build_msg(gateway)
  robot.send_message(target, msg) if msg
  robot.send_message(target, "No groups found") if msg.nil? && opts[:negative_ack]
end