class Alexa::Responses::Bye

Attributes

directives[RW]
intent[RW]

Public Class Methods

new(intent:, directives: []) click to toggle source
# File lib/alexa/responses/bye.rb, line 6
def initialize(intent:, directives: [])
  @intent = intent
end

Public Instance Methods

end_session?() click to toggle source
# File lib/alexa/responses/bye.rb, line 23
def end_session?
  true
end
partial_path(format: :ssml) click to toggle source
# 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() click to toggle source
# 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