Class: CodeFromDescriptionGenerator
- Inherits:
-
Sublayer::Generators::Base
- Object
- Sublayer::Generators::Base
- CodeFromDescriptionGenerator
- Defined in:
- lib/sublayer/cli/commands/generators/example_generator.rb
Instance Attribute Summary
Attributes inherited from Sublayer::Generators::Base
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(description:, technologies:) ⇒ CodeFromDescriptionGenerator
constructor
A new instance of CodeFromDescriptionGenerator.
- #prompt ⇒ Object
Methods inherited from Sublayer::Generators::Base
Constructor Details
#initialize(description:, technologies:) ⇒ CodeFromDescriptionGenerator
Returns a new instance of CodeFromDescriptionGenerator.
6 7 8 9 |
# File 'lib/sublayer/cli/commands/generators/example_generator.rb', line 6 def initialize(description:, technologies:) @description = description @technologies = technologies end |
Instance Method Details
#generate ⇒ Object
11 12 13 |
# File 'lib/sublayer/cli/commands/generators/example_generator.rb', line 11 def generate super end |
#prompt ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/sublayer/cli/commands/generators/example_generator.rb', line 15 def prompt <<-PROMPT You are an expert programmer in #{@technologies.join(", ")}. You are tasked with writing code using the following technologies: #{@technologies.join(", ")}. The description of the task is #{@description} Take a deep breath and think step by step before you start coding. PROMPT end |