Class: Afterlife::Config::Cli

Inherits:
Thor
  • Object
show all
Includes:
BaseCli
Defined in:
lib/afterlife/config/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BaseCli

#fatal!, #log_error, #log_info, #log_interrupted, #log_success, #sure?

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/afterlife/config/cli.rb', line 7

def self.exit_on_failure?
  true
end

Instance Method Details

#get(path) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/afterlife/config/cli.rb', line 12

def get(path)
  Repo::Config.read(path) do |value|
    say value
  end
rescue Repo::Config::Error => e
  fatal!(e.message)
end