Class: Ralyxa::ResponseEntities::Directives::Audio::AudioItem
- Inherits:
-
Object
- Object
- Ralyxa::ResponseEntities::Directives::Audio::AudioItem
- Defined in:
- lib/ralyxa/response_entities/directives/audio/audio_item.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(stream) ⇒ AudioItem
constructor
A new instance of AudioItem.
- #to_h ⇒ Object
Constructor Details
#initialize(stream) ⇒ AudioItem
Returns a new instance of AudioItem.
6 7 8 |
# File 'lib/ralyxa/response_entities/directives/audio/audio_item.rb', line 6 def initialize(stream) @stream = stream end |
Class Method Details
.as_hash(stream) ⇒ Object
16 17 18 |
# File 'lib/ralyxa/response_entities/directives/audio/audio_item.rb', line 16 def self.as_hash(stream) new(stream).to_h end |
Instance Method Details
#to_h ⇒ Object
10 11 12 13 14 |
# File 'lib/ralyxa/response_entities/directives/audio/audio_item.rb', line 10 def to_h {}.tap do |audio_item| audio_item['stream'] = @stream.to_h end end |