Class: FixA11yGenerator
- Inherits:
-
Sublayer::Generators::Base
- Object
- Sublayer::Generators::Base
- FixA11yGenerator
- Defined in:
- lib/fix_a11y_generator.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(contents:, issue:, additional_prompt: nil) ⇒ FixA11yGenerator
constructor
A new instance of FixA11yGenerator.
- #prompt ⇒ Object
Constructor Details
#initialize(contents:, issue:, additional_prompt: nil) ⇒ FixA11yGenerator
Returns a new instance of FixA11yGenerator.
6 7 8 9 10 |
# File 'lib/fix_a11y_generator.rb', line 6 def initialize(contents:, issue:, additional_prompt: nil) @contents = contents @issue = issue @additional_prompt = additional_prompt end |
Instance Method Details
#generate ⇒ Object
12 13 14 |
# File 'lib/fix_a11y_generator.rb', line 12 def generate super end |
#prompt ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/fix_a11y_generator.rb', line 16 def prompt <<~PROMPT Given the following JSX contents and an individual accessibility issue, generate a new JSX file with the individual issue fixed, leaving the rest of the contents unchanged.: Code: #{@contents} Accessibility issue: #{@issue} Additional user instructions (if any): #{@additional_prompt || "None"} Return the JSX contents with the issue fixed. PROMPT end |