Class: Wafoo::CLI

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

Instance Method Summary collapse

Instance Method Details

#applyObject



35
36
37
38
# File 'lib/wafoo/cli.rb', line 35

def apply
  wafoo = Wafoo::Run.new(options)
  wafoo.update_ipset(options[:ip_set_id], options[:dry_run])
end

#createObject



43
44
45
46
# File 'lib/wafoo/cli.rb', line 43

def create
  wafoo = Wafoo::Run.new(options)
  wafoo.create_ipset(options[:ip_set_name])
end

#exportObject



26
27
28
29
# File 'lib/wafoo/cli.rb', line 26

def export
  wafoo = Wafoo::Run.new(options)
  wafoo.export_ipset(options[:ip_set_id])
end

#listObject



18
19
20
21
# File 'lib/wafoo/cli.rb', line 18

def list
  wafoo = Wafoo::Run.new(options)
  wafoo.list_ipsets
end

#versionObject



12
13
14
# File 'lib/wafoo/cli.rb', line 12

def version
  puts Wafoo::VERSION
end