Class: Awful::WAF::Rule

Inherits:
Base show all
Defined in:
lib/awful/waf_rule.rb

Instance Method Summary collapse

Methods inherited from Base

#change

Methods inherited from Cli

#initialize

Constructor Details

This class inherits a constructor from Awful::Cli

Instance Method Details

#lsObject



13
14
15
16
17
18
19
20
21
# File 'lib/awful/waf_rule.rb', line 13

def ls
  list_thing(:rules).output do |rules|
    if options[:long]
      print_table rules.map { |r| [r.name, r.rule_id] }
    else
      puts rules.map(&:name)
    end
  end
end