Class: Terraspace::CLI::Info
- Inherits:
-
Base
- Object
- Base
- Terraspace::CLI::Info
show all
- Extended by:
- Memoist
- Defined in:
- lib/terraspace/cli/info.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
#pretty_path, #pretty_time
Methods included from Util::Sure
#sure?
#logger
Instance Method Details
#info ⇒ Object
26
27
28
|
# File 'lib/terraspace/cli/info.rb', line 26
def info
@mod.to_info
end
|
#run ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/terraspace/cli/info.rb', line 5
def run
if @options[:path]
show_path
else
show_all
end
end
|
#show_all ⇒ Object
13
14
15
16
17
18
19
20
|
# File 'lib/terraspace/cli/info.rb', line 13
def show_all
presenter = CliFormat::Presenter.new(@options)
presenter. = %w[Name Value]
info.each do |k,v|
presenter.rows << [k, v]
end
presenter.show
end
|
#show_path ⇒ Object
22
23
24
|
# File 'lib/terraspace/cli/info.rb', line 22
def show_path
puts info[:cache_dir]
end
|