# File lib/rudy/cli/disks.rb, line 7 7: def disks 8: disk_list = get_disks 9: # If there are no disks currently, there could be backups 10: # so we grab those to create a list of disks. 11: if @option.backups 12: backups = Rudy::Backups.list(more, less) || [] 13: backups.each_with_index do |b, index| 14: disk_list << b.disk 15: end 16: end 17: # We go through the list of disks but we'll skip ones we've seen 18: seen = [] 19: disk_list.each do |d| 20: next if seen.member?(d.name) 21: seen << d.name 22: print_stobject d 23: if @option.backups 24: d.backups.each_with_index do |b, index| 25: li ' %s' % b.name 26: ##break if @option.all.nil? && index >= 2 # display only 3, unless all 27: end 28: end 29: end 30: end