Class: Avm::Tools::Runner::Git::DirtyFiles
- Inherits:
-
EacRubyUtils::Console::DocoptRunner
- Object
- EacRubyUtils::Console::DocoptRunner
- Avm::Tools::Runner::Git::DirtyFiles
- Defined in:
- lib/avm/tools/runner/git/dirty_files.rb
Constant Summary collapse
- FIELDS =
{ i: :index, w: :worktree, p: :path, a: :absolute_path }.map { |k, v| ["%#{k}", v] }.to_h
- FIELDS_DOC =
FIELDS.map { |k, v| " #{k} => #{v}" }.join("\n")
- DOC =
<<~DOCOPT Lists dirty files in Git repository. Usage: __PROGRAM__ [options] __PROGRAM__ -h | --help Options: -h --help Mostra esta ajuda. -f --format=<format> Format of each line (See "Format fields") [default: %p]. Format fields: #{FIELDS_DOC} DOCOPT
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
34 35 36 37 38 |
# File 'lib/avm/tools/runner/git/dirty_files.rb', line 34 def run context(:git).dirty_files.each do |file| out("#{format_file(file)}\n") end end |