Class: AlexaRuby::AudioState
- Inherits:
-
Object
- Object
- AlexaRuby::AudioState
- Defined in:
- lib/alexa_ruby/request/base_request/context/audio_state.rb
Overview
Audio state from context section in request
Instance Attribute Summary collapse
-
#playback_offset ⇒ Object
readonly
Returns the value of attribute playback_offset.
-
#playback_state ⇒ Object
readonly
Returns the value of attribute playback_state.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(audio_state) ⇒ AudioState
constructor
Setup new AudioState object.
Constructor Details
#initialize(audio_state) ⇒ AudioState
Setup new AudioState object
9 10 11 12 13 |
# File 'lib/alexa_ruby/request/base_request/context/audio_state.rb', line 9 def initialize(audio_state) @token = audio_state[:token] @playback_offset = audio_state[:offsetInMilliseconds] @playback_state = audio_state[:playerActivity] end |
Instance Attribute Details
#playback_offset ⇒ Object (readonly)
Returns the value of attribute playback_offset.
4 5 6 |
# File 'lib/alexa_ruby/request/base_request/context/audio_state.rb', line 4 def playback_offset @playback_offset end |
#playback_state ⇒ Object (readonly)
Returns the value of attribute playback_state.
4 5 6 |
# File 'lib/alexa_ruby/request/base_request/context/audio_state.rb', line 4 def playback_state @playback_state end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
4 5 6 |
# File 'lib/alexa_ruby/request/base_request/context/audio_state.rb', line 4 def token @token end |