Class: Fog::Bouncer::CLI::DiffCommand

Inherits:
AbstractCommand show all
Defined in:
lib/fog/bouncer/cli/diff.rb

Instance Method Summary collapse

Methods inherited from AbstractCommand

#confirm, #file

Instance Method Details

#executeObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/fog/bouncer/cli/diff.rb', line 8

def execute
  doorlist = Fog::Bouncer.load(file)
  doorlist.import_remote_groups
  groups = doorlist.groups

  Fog::Bouncer::CLI::Diff.for(doorlist, diff_format)

  if apply? && confirm
    doorlist.sync
  end
end