Class: SwitchDb::Command::List
- Defined in:
- lib/switch_db/command/list.rb
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from SwitchDb::Command::Base
Instance Method Details
#run ⇒ Object
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 |