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.



96
97
98
99
# File 'lib/typecast/models.rb', line 96

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

Instance Attribute Details

#next_text ⇒ Object (readonly)

Returns the value of attribute next_text.



94
95
96
# File 'lib/typecast/models.rb', line 94

def next_text
  @next_text
end

#previous_text ⇒ Object (readonly)

Returns the value of attribute previous_text.



94
95
96
# File 'lib/typecast/models.rb', line 94

def previous_text
  @previous_text
end

Instance Method Details

#to_h ⇒ Object



101
102
103
# File 'lib/typecast/models.rb', line 101

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