Class: Avm::Tools::Runner::Git::DirtyFiles
- Defined in:
- lib/avm/tools/runner/git/dirty_files.rb
Constant Summary collapse
- DEFAULT_FORMAT =
'%p'
- FIELDS =
{ i: :index, w: :worktree, p: :path, a: :absolute_path }.map { |k, v| ["%#{k}", v] }.to_h
Instance Method Summary collapse
Instance Method Details
#help_extra_text ⇒ Object
21 22 23 |
# File 'lib/avm/tools/runner/git/dirty_files.rb', line 21 def help_extra_text "Format fields:\n" + FIELDS.map { |k, v| " #{k} => #{v}" }.join("\n") end |
#run ⇒ Object
25 26 27 28 29 |
# File 'lib/avm/tools/runner/git/dirty_files.rb', line 25 def run runner_context.call(:git).dirty_files.each do |file| out("#{format_file(file)}\n") end end |