Class: PropelFacets::UnpackGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/propel_facets/unpack_generator.rb

Instance Method Summary collapse

Instance Method Details

#unpack_propel_facets_generator ⇒ Object



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/generators/propel_facets/unpack_generator.rb', line 60

def unpack_propel_facets_generator
  show_welcome_message
  
  components_to_unpack = determine_components
  destination_path = "lib/generators/propel_facets"
  
  if File.exist?(destination_path) && !options[:force]
    say "⚠️  #{destination_path} already exists (use --force to overwrite)", :yellow
    return
  end

  say "📦 Extracting PropelFacets generator components: #{components_to_unpack.join(', ')}", :green
  say ""

  unpack_components(components_to_unpack, destination_path)
  show_completion_message(destination_path)
end