Class: PVN::Status::Command
- Inherits:
-
Command::Command
- Object
- Command::Command
- PVN::Status::Command
- Defined in:
- lib/pvn/status/command.rb
Constant Summary collapse
- DEFAULT_LIMIT =
15
Instance Method Summary collapse
Methods inherited from Command::Command
description, example, getdoc, #initialize, matches_subcommand?, options, optscls, optset, #show_help, subcommands, summary, #to_doc, usage
Constructor Details
This class inherits a constructor from PVN::Command::Command
Instance Method Details
#init(options) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/pvn/status/command.rb', line 27 def init paths = .paths paths = %w{ . } if paths.empty? allentries = Array.new # we sort only the sub-entries, so the order in which paths were specified is preserved paths.each do |path| elmt = PVN::IO::Element.new :local => path entries = elmt.find_files_by_status allentries.concat entries.sort_by { |n| n.path } end fmtr = PVN::Status::EntriesFormatter.new .color, allentries $io.puts fmtr.format end |