Class: AskChatgpt::Prompts::Question

Inherits:
Base
  • Object
show all
Defined in:
lib/ask_chatgpt/prompts/question.rb

Direct Known Subclasses

RandomTip

Instance Attribute Summary

Attributes inherited from Base

#record

Instance Method Summary collapse

Methods inherited from Base

#content

Constructor Details

#initialize(record) ⇒ Question

Returns a new instance of Question.



4
5
6
# File 'lib/ask_chatgpt/prompts/question.rb', line 4

def initialize(record)
  @record = record.is_a?(String) ? record : record.to_json
end