Class: Typecast::Models::Prompt

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(emotion_preset: nil, emotion_intensity: nil) ⇒ Prompt

Returns a new instance of Prompt.



54
55
56
57
# File 'lib/typecast/models.rb', line 54

def initialize(emotion_preset: nil, emotion_intensity: nil)
  @emotion_preset = emotion_preset
  @emotion_intensity = emotion_intensity
end

Instance Attribute Details

#emotion_intensityObject (readonly)

Returns the value of attribute emotion_intensity.



52
53
54
# File 'lib/typecast/models.rb', line 52

def emotion_intensity
  @emotion_intensity
end

#emotion_presetObject (readonly)

Returns the value of attribute emotion_preset.



52
53
54
# File 'lib/typecast/models.rb', line 52

def emotion_preset
  @emotion_preset
end

Instance Method Details

#to_hObject



59
60
61
# File 'lib/typecast/models.rb', line 59

def to_h
  Models.compact(emotion_preset: emotion_preset, emotion_intensity: emotion_intensity)
end