Class: Consul::Migrate::Cli

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Cli

Returns a new instance of Cli.



14
15
16
17
# File 'lib/consul/migrate/cli.rb', line 14

def initialize(*args)
  super
  read_config
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



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

def client
  @client
end

Instance Method Details

#exportObject



38
39
40
# File 'lib/consul/migrate/cli.rb', line 38

def export
  @client.export_acls(options[:file])
end

#importObject



45
46
47
# File 'lib/consul/migrate/cli.rb', line 45

def import
  @client.import_acls(options[:file])
end

#initObject



31
32
33
# File 'lib/consul/migrate/cli.rb', line 31

def init
  write_config(options)
end

#versionObject



20
21
22
# File 'lib/consul/migrate/cli.rb', line 20

def version
  say VERSION
end