Class: Ralyxa::ResponseEntities::Directives::AudioPlayer::ClearQueue
- Inherits:
-
Object
- Object
- Ralyxa::ResponseEntities::Directives::AudioPlayer::ClearQueue
- Defined in:
- lib/ralyxa/response_entities/directives/audio_player/clear_queue.rb
Constant Summary collapse
- CLEAR_ENQUEUED =
'CLEAR_ENQUEUED'.freeze
- CLEAR_ALL =
'CLEAR_ALL'.freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(behaviour = Ralyxa::ResponseEntities::Directives::AudioPlayer::ClearQueue::CLEAR_ENQUEUED) ⇒ ClearQueue
constructor
A new instance of ClearQueue.
- #to_h ⇒ Object
Constructor Details
#initialize(behaviour = Ralyxa::ResponseEntities::Directives::AudioPlayer::ClearQueue::CLEAR_ENQUEUED) ⇒ ClearQueue
Returns a new instance of ClearQueue.
9 10 11 |
# File 'lib/ralyxa/response_entities/directives/audio_player/clear_queue.rb', line 9 def initialize(behaviour = Ralyxa::ResponseEntities::Directives::AudioPlayer::ClearQueue::CLEAR_ENQUEUED) @behaviour = behaviour end |
Class Method Details
.as_hash(behaviour = Ralyxa::ResponseEntities::Directives::AudioPlayer::ClearQueue::CLEAR_ENQUEUED) ⇒ Object
20 21 22 |
# File 'lib/ralyxa/response_entities/directives/audio_player/clear_queue.rb', line 20 def self.as_hash(behaviour = Ralyxa::ResponseEntities::Directives::AudioPlayer::ClearQueue::CLEAR_ENQUEUED) new(behaviour).to_h end |
Instance Method Details
#to_h ⇒ Object
13 14 15 16 17 18 |
# File 'lib/ralyxa/response_entities/directives/audio_player/clear_queue.rb', line 13 def to_h {}.tap do |audio_player| audio_player['type'] = 'AudioPlayer.ClearQueue' audio_player['clearBehavior'] = @behaviour end end |