class AlexaToolbox::Context

Handles the session object in requests.

Attributes

audioplayer[R]
json[R]
system[R]

Public Class Methods

new(context) click to toggle source
# File lib/alexa_toolbox/context.rb, line 7
def initialize (context)
  @system = context.key?(:System) ? context[:System] : ""
  @audioplayer = context.key?(:AudioPlayer) ? AlexaToolbox::AudioPlayer.new(context[:AudioPlayer]) : nil
  @json = context
end

Public Instance Methods

application_id() click to toggle source
# File lib/alexa_toolbox/context.rb, line 13
def application_id
  return self.system[:application][:applicationId]
end
device_id() click to toggle source
# File lib/alexa_toolbox/context.rb, line 21
def device_id
  return self.system[:device][:deviceId]
end
user_id() click to toggle source
# File lib/alexa_toolbox/context.rb, line 17
def user_id
  return self.system[:user][:userId]
end