20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/vagabond/actions/status.rb', line 20
def _status
status = [
ui.color('Name', :bold),
ui.color('State', :bold),
ui.color('PID', :bold),
ui.color('IP', :bold)
]
if(name)
status += status_for(name)
else
if(self.is_a?(Vagabond))
names = (Array(vagabondfile[:boxes].keys) | Array(internal_config[mappings_key].keys))
else
names = Array(internal_config[mappings_key].keys)
end
names.sort.each do |n|
status += status_for(n)
end
end
puts ui.list(status, :uneven_columns_across, 4)
end
|