Class: Lita::Commands::TwoFactorOff
- Inherits:
-
Object
- Object
- Lita::Commands::TwoFactorOff
- Defined in:
- lib/lita/commands/two_factor_off.rb
Instance Method Summary collapse
-
#initialize(ou_path = "/") ⇒ TwoFactorOff
constructor
A new instance of TwoFactorOff.
- #name ⇒ Object
- #run(robot, target, gateway, opts = {}) ⇒ Object
Constructor Details
#initialize(ou_path = "/") ⇒ TwoFactorOff
Returns a new instance of TwoFactorOff.
6 7 8 |
# File 'lib/lita/commands/two_factor_off.rb', line 6 def initialize(ou_path = "/") @ou_path = ou_path end |
Instance Method Details
#name ⇒ Object
10 11 12 |
# File 'lib/lita/commands/two_factor_off.rb', line 10 def name 'two-factor-off' end |
#run(robot, target, gateway, opts = {}) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/lita/commands/two_factor_off.rb', line 14 def run(robot, target, gateway, opts = {}) msg = build_msg(gateway) robot.(target, msg) if msg if msg.nil? && opts[:negative_ack] robot.(target, "All users in #{@ou_path} have Two Factor Authentication enabled") end end |