Class: AlexaRuby::Device
- Inherits:
-
Object
- Object
- AlexaRuby::Device
- Defined in:
- lib/alexa_ruby/request/base_request/context/device.rb
Overview
User device parameters
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#interfaces ⇒ Object
readonly
Returns the value of attribute interfaces.
Instance Method Summary collapse
-
#initialize(device) ⇒ Device
constructor
Initialize new device.
Constructor Details
#initialize(device) ⇒ Device
Initialize new device
10 11 12 13 14 |
# File 'lib/alexa_ruby/request/base_request/context/device.rb', line 10 def initialize(device) raise ArgumentError, 'Missing device ID' if device[:deviceId].nil? @id = device[:deviceId] load_interfaces(device[:supportedInterfaces]) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/alexa_ruby/request/base_request/context/device.rb', line 4 def id @id end |
#interfaces ⇒ Object (readonly)
Returns the value of attribute interfaces.
4 5 6 |
# File 'lib/alexa_ruby/request/base_request/context/device.rb', line 4 def interfaces @interfaces end |