Class: Lita::Commands::NoOrgUnit

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

Instance Method Summary collapse

Instance Method Details

#nameObject



5
6
7
# File 'lib/lita/commands/no_org_unit.rb', line 5

def name
  'no-org-unit'
end

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



9
10
11
12
13
# File 'lib/lita/commands/no_org_unit.rb', line 9

def run(robot, target, gateway, opts = {})
  msg = build_msg(gateway)
  robot.send_message(target, msg) if msg
  robot.send_message(target, "No users are missing an org unit") if msg.nil? && opts[:negative_ack]
end