20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/sublayer/cli/commands/generators/sublayer_command_generator.rb', line 20
def prompt
" You are an expert Ruby developer.\n\n Given the following Sublayer generator code:\n\n \#{@generator_code}\n\n Please generate a Thor command class that interacts with this generator. The command should:\n\n - Be a subclass of `BaseCommand`.\n - Include a descriptive class name.\n - Provide a description for the command.\n - Implement an `execute` method that accepts appropriate arguments and invokes the generator.\n\n Provide the class name, description, execute method body, and filename for the command.\n\n These parameters will be used in a template to create the command file. The template is:\n module <%= project_name.camelize %>\n module Commands\n class <%= command_class_name %> < BaseCommand\n def self.description\n \"<%= command_description %>\"\n end\n\n def execute(*args)\n <%= command_execute_body %>\n end\n end\n end\n end\n\n Take into account any parameters the generator requires and map them to command-line arguments.\n PROMPT\nend\n"
|