Class: Packs::Private::InteractiveCli::UseCases::Move

Inherits:
Object
  • Object
show all
Extended by:
T::Helpers, T::Sig
Includes:
Interface
Defined in:
lib/packs/private/interactive_cli/use_cases/move.rb

Instance Method Summary collapse

Methods included from Interface

all, included

Instance Method Details

#perform!(prompt) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/packs/private/interactive_cli/use_cases/move.rb', line 13

def perform!(prompt)
  pack = PackSelector.single_pack_select(prompt, question_text: 'Please select a destination pack')
  paths_relative_to_root = FileSelector.select(prompt)

  Packs.move_to_pack!(
    pack_name: pack.name,
    paths_relative_to_root: paths_relative_to_root,
    per_file_processors: [Packs::RubocopPostProcessor.new, Packs::CodeOwnershipPostProcessor.new]
  )
end

#user_facing_nameObject



25
26
27
# File 'lib/packs/private/interactive_cli/use_cases/move.rb', line 25

def user_facing_name
  'Move files'
end