Class: YandexSpeechApi::Emotion
- Inherits:
-
Object
- Object
- YandexSpeechApi::Emotion
- Defined in:
- lib/yandex_speech/emotion.rb
Defined Under Namespace
Classes: EmotionNotAllowed
Instance Attribute Summary collapse
-
#type ⇒ Symbol
readonly
Possible values: :evil, :good or :neutral.
Class Method Summary collapse
-
.list ⇒ Array<String>
List of allowed emotions.
Instance Method Summary collapse
-
#initialize(emotion) ⇒ Emotion
constructor
A new instance of Emotion.
Constructor Details
#initialize(emotion) ⇒ Emotion
Returns a new instance of Emotion.
21 22 23 24 25 |
# File 'lib/yandex_speech/emotion.rb', line 21 def initialize(emotion) @type = emotion.downcase.to_sym raise EmotionNotAllowed, emotion unless emotion_known? @type end |
Instance Attribute Details
#type ⇒ Symbol (readonly)
Returns possible values: :evil, :good or :neutral.
19 20 21 |
# File 'lib/yandex_speech/emotion.rb', line 19 def type @type end |
Class Method Details
.list ⇒ Array<String>
List of allowed emotions
11 12 13 |
# File 'lib/yandex_speech/emotion.rb', line 11 def self.list i(evil good neutral) end |