Class: AlexaRuby::IntentRequest
- Inherits:
-
BaseRequest
- Object
- BaseRequest
- AlexaRuby::IntentRequest
- Defined in:
- lib/alexa_ruby/request/intent_request.rb
Overview
IntentRequest class implements Alexa “IntentRequest” request type
Instance Attribute Summary collapse
-
#confirmation_status ⇒ Object
readonly
Returns the value of attribute confirmation_status.
-
#dialog_state ⇒ Object
readonly
Returns the value of attribute dialog_state.
-
#intent_name ⇒ Object
readonly
Returns the value of attribute intent_name.
-
#slots ⇒ Object
readonly
Returns the value of attribute slots.
Attributes inherited from BaseRequest
#certificates_chain_url, #context, #id, #locale, #session, #signature, #timestamp, #type, #version
Instance Method Summary collapse
-
#initialize(request) ⇒ IntentRequest
constructor
Initialize new Intent request.
Methods inherited from BaseRequest
Constructor Details
#initialize(request) ⇒ IntentRequest
Initialize new Intent request
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/alexa_ruby/request/intent_request.rb', line 9 def initialize(request) @type = :intent super if @req[:request][:intent].nil? raise ArgumentError, 'Intent must be defined' end @intent = @req[:request][:intent] @dialog_state = define_dialog_state @intent_name = @intent[:name] @confirmation_status = define_confirmation_status parse_slots unless @intent[:slots].nil? end |
Instance Attribute Details
#confirmation_status ⇒ Object (readonly)
Returns the value of attribute confirmation_status.
4 5 6 |
# File 'lib/alexa_ruby/request/intent_request.rb', line 4 def confirmation_status @confirmation_status end |
#dialog_state ⇒ Object (readonly)
Returns the value of attribute dialog_state.
4 5 6 |
# File 'lib/alexa_ruby/request/intent_request.rb', line 4 def dialog_state @dialog_state end |
#intent_name ⇒ Object (readonly)
Returns the value of attribute intent_name.
4 5 6 |
# File 'lib/alexa_ruby/request/intent_request.rb', line 4 def intent_name @intent_name end |
#slots ⇒ Object (readonly)
Returns the value of attribute slots.
4 5 6 |
# File 'lib/alexa_ruby/request/intent_request.rb', line 4 def slots @slots end |