Class: Avm::Git::Runners::Base::DirtyFiles
- Inherits:
-
Object
- Object
- Avm::Git::Runners::Base::DirtyFiles
- Defined in:
- lib/avm/git/runners/base/dirty_files.rb
Constant Summary collapse
- DEFAULT_FORMAT =
'%p'- FIELDS =
{ i: :index, w: :worktree, p: :path, a: :absolute_path }.transform_keys { |k| "%#{k}" }
Instance Method Summary collapse
Instance Method Details
#help_extra_text ⇒ Object
19 20 21 |
# File 'lib/avm/git/runners/base/dirty_files.rb', line 19 def help_extra_text "Format fields:\n" + FIELDS.map { |k, v| " #{k} => #{v}" }.join("\n") # rubocop:disable Style/StringConcatenation end |
#run ⇒ Object
23 24 25 26 27 |
# File 'lib/avm/git/runners/base/dirty_files.rb', line 23 def run runner_context.call(:git).dirty_files.each do |file| out("#{format_file(file)}\n") end end |