Open doriantaylor opened 1 year ago
Hi Dorian,
Thanks for this PR.
To prevent ugly compromises in the code when we want to access the prompt without modifying the state of the answer collector.
Please provide an example when this is the case.
It's literally one line of code.
Let's take a step back for a moment. I maintain many Ruby projects and over the years established some helpful processes. The checklist is one of them. I have a responsibility to release quality software. This is a project that many people rely on and use. How would they find out about this addition, which is an extension of public API if no documentation is updated? More importantly, it would be good to have a test case that proves and cements the API so that nothing regresses in the future. So I'd encourage you to consider the checklist more carefully with an eye towards the longevity of the project and maintenance.
Describe the change
Adds a read-only accessor to the
@prompt
member ofTTY::Prompt::AnswerCollector
Why are we doing this?
To prevent ugly compromises in the code when we want to access the prompt without modifying the state of the answer collector.
Benefits
See above.
Drawbacks
It's literally one line of code that says
attr_reader :prompt
.Requirements
It's literally one line of code.