Class: Typecast::Models::SmartPrompt

Inherits:
Object
  • Object
show all
Defined in:
lib/typecast/models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(previous_text: nil, next_text: nil) ⇒ SmartPrompt

Returns a new instance of SmartPrompt.



80
81
82
83
# File 'lib/typecast/models.rb', line 80

def initialize(previous_text: nil, next_text: nil)
  @previous_text = previous_text
  @next_text = next_text
end

Instance Attribute Details

#next_textObject (readonly)

Returns the value of attribute next_text.



78
79
80
# File 'lib/typecast/models.rb', line 78

def next_text
  @next_text
end

#previous_textObject (readonly)

Returns the value of attribute previous_text.



78
79
80
# File 'lib/typecast/models.rb', line 78

def previous_text
  @previous_text
end

Instance Method Details

#to_hObject



85
86
87
# File 'lib/typecast/models.rb', line 85

def to_h
  Models.compact(emotion_type: "smart", previous_text: previous_text, next_text: next_text)
end