Class: VoiceML::StreamList
- Inherits:
-
Object
- Object
- VoiceML::StreamList
- Includes:
- Pageable
- Defined in:
- lib/voiceml/models/streams.rb
Overview
Paginated ‘GET /Calls/Sid/Streams` response.
Constant Summary
Constants included from Pageable
Instance Attribute Summary collapse
-
#streams ⇒ Object
readonly
Returns the value of attribute streams.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ StreamList
constructor
A new instance of StreamList.
Methods included from Pageable
Constructor Details
#initialize(hash = {}) ⇒ StreamList
Returns a new instance of StreamList.
35 36 37 38 |
# File 'lib/voiceml/models/streams.rb', line 35 def initialize(hash = {}) assign_page_fields(hash) @streams = (hash['streams'] || []).map { |s| Stream.from_hash(s) } end |
Instance Attribute Details
#streams ⇒ Object (readonly)
Returns the value of attribute streams.
33 34 35 |
# File 'lib/voiceml/models/streams.rb', line 33 def streams @streams end |
Class Method Details
.from_hash(hash) ⇒ Object
40 41 42 |
# File 'lib/voiceml/models/streams.rb', line 40 def self.from_hash(hash) new(hash || {}) end |