Class: AlexaRuby::User
- Inherits:
-
Object
- Object
- AlexaRuby::User
- Defined in:
- lib/alexa_ruby/request/base_request/user.rb
Overview
Amazon Alexa user
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#permissions_token ⇒ Object
readonly
Returns the value of attribute permissions_token.
Instance Method Summary collapse
-
#initialize(user) ⇒ User
constructor
Initialize new user.
Constructor Details
#initialize(user) ⇒ User
Initialize new user
10 11 12 13 14 15 16 |
# File 'lib/alexa_ruby/request/base_request/user.rb', line 10 def initialize(user) raise ArgumentError, 'Missing user ID' if user[:userId].nil? @id = user[:userId] @access_token = user[:accessToken] unless user[:accessToken].nil? return if user[:permissions].nil? @permissions_token = (user[:permissions]) end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
4 5 6 |
# File 'lib/alexa_ruby/request/base_request/user.rb', line 4 def access_token @access_token end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/alexa_ruby/request/base_request/user.rb', line 4 def id @id end |
#permissions_token ⇒ Object (readonly)
Returns the value of attribute permissions_token.
4 5 6 |
# File 'lib/alexa_ruby/request/base_request/user.rb', line 4 def @permissions_token end |