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
- #partials_directory ⇒ Object
Methods inherited from Alexa::Response
#elicit_directives, #elicit_slot!, #intent_directory_name, #keep_listening!, #keep_listening?, #with
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
23 24 25 |
# File 'lib/alexa/responses/bye.rb', line 23 def end_session? true end |
#partial_path(format: :ssml) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/alexa/responses/bye.rb', line 10 def partial_path(format: :ssml) if format == :ssml "#{partials_directory}/bye.ssml.erb" else "#{partials_directory}/bye.text.erb" end end |
#partials_directory ⇒ Object
18 19 20 21 |
# File 'lib/alexa/responses/bye.rb', line 18 def partials_directory @_partials_directory ||= "alexa/#{intent.context.locale.downcase}/intent_handlers/"\ "#{intent.class.name.demodulize.underscore}" end |