Class: SSH::Allow::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/ssh/allow/cli.rb

Instance Method Summary collapse

Instance Method Details

#guardObject



12
13
14
15
16
# File 'lib/ssh/allow/cli.rb', line 12

def guard
  rule_set.read(options[:rules])
  puts command if options[:echo]
  command.allowed?(rule_set.rules) ? command.run : fail
end