Class: GoogleAssistant::Conversation
- Inherits:
-
Object
- Object
- GoogleAssistant::Conversation
- Defined in:
- lib/google_assistant/conversation.rb
Defined Under Namespace
Classes: Type
Instance Attribute Summary collapse
-
#dialog_state ⇒ Object
readonly
Returns the value of attribute dialog_state.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #data ⇒ Object
- #data=(data) ⇒ Object
-
#initialize(opts) ⇒ Conversation
constructor
A new instance of Conversation.
- #state ⇒ Object
- #state=(state) ⇒ Object
Constructor Details
#initialize(opts) ⇒ Conversation
Returns a new instance of Conversation.
15 16 17 18 19 |
# File 'lib/google_assistant/conversation.rb', line 15 def initialize(opts) @id = opts["conversation_id"] @type = opts["type"] @dialog_state = DialogState.new(opts["conversation_token"]) end |
Instance Attribute Details
#dialog_state ⇒ Object (readonly)
Returns the value of attribute dialog_state.
13 14 15 |
# File 'lib/google_assistant/conversation.rb', line 13 def dialog_state @dialog_state end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
13 14 15 |
# File 'lib/google_assistant/conversation.rb', line 13 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
13 14 15 |
# File 'lib/google_assistant/conversation.rb', line 13 def type @type end |
Instance Method Details
#data ⇒ Object
29 30 31 |
# File 'lib/google_assistant/conversation.rb', line 29 def data dialog_state.data end |
#data=(data) ⇒ Object
33 34 35 |
# File 'lib/google_assistant/conversation.rb', line 33 def data=(data) dialog_state.data = data end |
#state ⇒ Object
21 22 23 |
# File 'lib/google_assistant/conversation.rb', line 21 def state dialog_state.state end |
#state=(state) ⇒ Object
25 26 27 |
# File 'lib/google_assistant/conversation.rb', line 25 def state=(state) dialog_state.state = state end |