Class: Alexa::Responses::Bye
- Inherits:
-
Alexa::Response
- Object
- Alexa::Response
- Alexa::Responses::Bye
- Defined in:
- lib/alexa/responses/bye.rb
Instance Attribute Summary collapse
-
#directives ⇒ Object
Returns the value of attribute directives.
-
#intent ⇒ Object
Returns the value of attribute intent.
Instance Method Summary collapse
- #end_session? ⇒ Boolean
-
#initialize(intent:, directives: []) ⇒ Bye
constructor
A new instance of Bye.
- #partial_path(format: :ssml) ⇒ Object
Methods inherited from Alexa::Response
#elicit_directives, #elicit_slot!, #keep_listening!, #keep_listening?
Constructor Details
#initialize(intent:, directives: []) ⇒ Bye
Returns a new instance of Bye.
6 7 8 |
# File 'lib/alexa/responses/bye.rb', line 6 def initialize(intent:, directives: []) @intent = intent end |
Instance Attribute Details
#directives ⇒ Object
Returns the value of attribute directives.
4 5 6 |
# File 'lib/alexa/responses/bye.rb', line 4 def directives @directives end |
#intent ⇒ Object
Returns the value of attribute intent.
4 5 6 |
# File 'lib/alexa/responses/bye.rb', line 4 def intent @intent end |
Instance Method Details
#end_session? ⇒ Boolean
21 22 23 |
# File 'lib/alexa/responses/bye.rb', line 21 def end_session? true end |
#partial_path(format: :ssml) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/alexa/responses/bye.rb', line 10 def partial_path(format: :ssml) template_path = "alexa/#{intent.context.locale}/intent_handlers/"\ "#{intent.class.name.demodulize.underscore}" if format == :ssml "#{template_path}/bye.ssml.erb" else "#{template_path}/bye.text.erb" end end |