Class: AlexaRuby::SessionEndedRequest
- Defined in:
- lib/alexa_ruby/request/session_ended_request.rb
Overview
Class for Amazon “SessionEndedRequest” request type
Instance Attribute Summary collapse
-
#reason ⇒ Object
Returns the value of attribute reason.
Attributes inherited from Request
#json, #locale, #request_id, #session, #type, #version
Instance Method Summary collapse
-
#initialize(json) ⇒ SessionEndedRequest
constructor
Initialize new SessionEndedRequest.
-
#to_s ⇒ String
Ouputs the request_id and the reason of session end.
Constructor Details
#initialize(json) ⇒ SessionEndedRequest
Initialize new SessionEndedRequest
10 11 12 13 14 |
# File 'lib/alexa_ruby/request/session_ended_request.rb', line 10 def initialize(json) @type = :session_ended @reason = json[:request][:reason] super end |
Instance Attribute Details
#reason ⇒ Object
Returns the value of attribute reason.
5 6 7 |
# File 'lib/alexa_ruby/request/session_ended_request.rb', line 5 def reason @reason end |
Instance Method Details
#to_s ⇒ String
Ouputs the request_id and the reason of session end
19 20 21 |
# File 'lib/alexa_ruby/request/session_ended_request.rb', line 19 def to_s "Session Ended for requestID: #{request_id} with reason #{reason}" end |