Class: Clag::CommandLineCommandGenerator

Inherits:
Sublayer::Generators::Base
  • Object
show all
Defined in:
lib/clag/generators/command_line_command_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(description:) ⇒ CommandLineCommandGenerator

Returns a new instance of CommandLineCommandGenerator.



7
8
9
# File 'lib/clag/generators/command_line_command_generator.rb', line 7

def initialize(description:)
  @description = description
end

Instance Method Details

#generateObject



11
12
13
# File 'lib/clag/generators/command_line_command_generator.rb', line 11

def generate
  super
end

#promptObject



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/clag/generators/command_line_command_generator.rb', line 15

def prompt
  <<-PROMPT
  You are an expert in command line operations.

  You are tasked with finding or crafting a command line command to achieve the following:

  #{@description}

  Considering best practices, what should be run on the command line to achieve this.

  If no command is possible, respond with 'unknown'
  PROMPT
end