Class: ICSP::Commands::Container::List
Instance Attribute Summary
Attributes inherited from BaseCommand
#arguments, #config, #options, #prompt
Instance Method Summary
collapse
Methods inherited from BaseCommand
#initialize
Instance Method Details
#csptest ⇒ Object
7
8
9
|
# File 'lib/commands/container/list.rb', line 7
def csptest
@csptest ||= @config.csptest
end
|
#execute ⇒ Object
11
12
13
14
15
16
|
# File 'lib/commands/container/list.rb', line 11
def execute
result = ::ICSP::Shell.new("#{csptest} -keyset -enum_containers -verifycontext -fqcn").execute
exit(result.exit_code) unless result.ok
result.output_lines.filter { |l| l.start_with?('\\') }
end
|
#print ⇒ Object
18
19
20
|
# File 'lib/commands/container/list.rb', line 18
def print
puts execute
end
|
#select ⇒ Object
22
23
24
|
# File 'lib/commands/container/list.rb', line 22
def select
@prompt.select('Choose container:', execute)
end
|