Class: Moura::Cli

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

Instance Method Summary collapse

Instance Method Details

#apply(file) ⇒ Object



23
24
25
26
27
28
# File 'lib/moura/cli.rb', line 23

def apply(file)
  model = Model::Diff.new(file)
  model.apply

  View::Diff.new(model.diff).show
end

#diff(file) ⇒ Object



16
17
18
19
20
# File 'lib/moura/cli.rb', line 16

def diff(file)
  model = Model::Diff.new(file)

  View::Diff.new(model.diff).show
end

#dumpObject



10
11
12
13
# File 'lib/moura/cli.rb', line 10

def dump
  remote_roles = Model::Remote.new.dump
  puts YAML.dump(remote_roles.sort_by(&:first).to_h)
end