Class: BotPlatform::State::ConversationState
- Defined in:
- lib/bot_platform/state/conversation_state.rb
Instance Attribute Summary
Attributes inherited from BotState
Instance Method Summary collapse
- #get_storage_key(turn_context) ⇒ Object
-
#initialize(storage) ⇒ ConversationState
constructor
A new instance of ConversationState.
Methods inherited from BotState
#create_property, #get_property, #save_changes
Methods included from Asserts
#assert_activity_is_not_null, #assert_activity_list_is_not_null, #assert_activity_type_is_not_null, #assert_context_is_not_null, #assert_conversation_reference_is_not_null, #assert_dialog_context_is_valid, #assert_dialog_id_is_valid, #assert_dialog_is_uniq, #assert_dialog_is_valid, #assert_dialog_set_is_valid, #assert_dialog_state_is_valid, #assert_is_not_empty, #assert_middleware_is_not_null, #assert_middleware_list_is_not_null, #assert_prompt_options_is_valid, #assert_turn_context_is_valid, #assert_waterfall_step_context_is_valid
Constructor Details
#initialize(storage) ⇒ ConversationState
Returns a new instance of ConversationState.
6 7 8 |
# File 'lib/bot_platform/state/conversation_state.rb', line 6 def initialize(storage) super(storage, "conversation_state") end |
Instance Method Details
#get_storage_key(turn_context) ⇒ Object
10 11 12 13 14 |
# File 'lib/bot_platform/state/conversation_state.rb', line 10 def get_storage_key(turn_context) channel_id = turn_context.activity.channel_id conversation_id = turn_context.conversation.id "#{channel_id}/conversations/#{conversation_id}" end |