Class: UsePackwerk::Private::InteractiveCli::UseCases::Nest

Inherits:
Object
  • Object
show all
Extended by:
T::Helpers, T::Sig
Includes:
Interface
Defined in:
lib/use_packwerk/private/interactive_cli/use_cases/nest.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
# File 'lib/use_packwerk/private/interactive_cli/use_cases/nest.rb', line 13

def perform!(prompt)
  child_pack = PackSelector.single_pack_select(prompt, question_text: 'Please select the pack that will be nested')
  parent_pack = PackSelector.single_pack_select(prompt, question_text: 'Please select the pack that will be the parent')
  UsePackwerk.move_to_parent!(
    parent_name: parent_pack.name,
    pack_name: child_pack.name,
    per_file_processors: [UsePackwerk::RubocopPostProcessor.new, UsePackwerk::CodeOwnershipPostProcessor.new]
  )
end

#user_facing_nameObject



24
25
26
# File 'lib/use_packwerk/private/interactive_cli/use_cases/nest.rb', line 24

def user_facing_name
  'Nest one pack under another'
end