Class: AskChatgpt::Prompts::WithCode
- Defined in:
- lib/ask_chatgpt/prompts/with_code.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Attributes inherited from Base
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(*args) ⇒ WithCode
constructor
A new instance of WithCode.
Constructor Details
#initialize(*args) ⇒ WithCode
Returns a new instance of WithCode.
7 8 9 |
# File 'lib/ask_chatgpt/prompts/with_code.rb', line 7 def initialize(*args) @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
5 6 7 |
# File 'lib/ask_chatgpt/prompts/with_code.rb', line 5 def args @args end |
Instance Method Details
#content ⇒ Object
11 12 13 |
# File 'lib/ask_chatgpt/prompts/with_code.rb', line 11 def content code_info.reject { |v| v.blank? }.join("\n") end |