Class: SwitchDb::Command::List

Inherits:
Base
  • Object
show all
Defined in:
lib/switch_db/command/list.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from SwitchDb::Command::Base

Instance Method Details

#runObject



4
5
6
7
8
9
10
# File 'lib/switch_db/command/list.rb', line 4

def run(*)
  length = @reference_set.references.size.to_s.length

  @reference_set.references.each_with_index do |(_, reference), index|
    puts "#{format_index(length, index)}: #{reference.name}"
  end
end