Class: Appwrite::Models::VideoCodecList
- Inherits:
-
Object
- Object
- Appwrite::Models::VideoCodecList
- Defined in:
- lib/appwrite/models/video_codec_list.rb
Instance Attribute Summary collapse
-
#codecs ⇒ Object
readonly
Returns the value of attribute codecs.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(total:, codecs:) ⇒ VideoCodecList
constructor
A new instance of VideoCodecList.
- #to_map ⇒ Object
Constructor Details
#initialize(total:, codecs:) ⇒ VideoCodecList
Returns a new instance of VideoCodecList.
9 10 11 12 13 14 15 |
# File 'lib/appwrite/models/video_codec_list.rb', line 9 def initialize( total:, codecs: ) @total = total @codecs = codecs end |
Instance Attribute Details
#codecs ⇒ Object (readonly)
Returns the value of attribute codecs.
7 8 9 |
# File 'lib/appwrite/models/video_codec_list.rb', line 7 def codecs @codecs end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
6 7 8 |
# File 'lib/appwrite/models/video_codec_list.rb', line 6 def total @total end |
Class Method Details
.from(map:) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/appwrite/models/video_codec_list.rb', line 17 def self.from(map:) map = { "total" => 0, "codecs" => [] }.merge(map) VideoCodecList.new( total: map["total"], codecs: map["codecs"].map { |it| VideoCodec.from(map: it) } ) end |
Instance Method Details
#to_map ⇒ Object
25 26 27 28 29 30 |
# File 'lib/appwrite/models/video_codec_list.rb', line 25 def to_map { "total": @total, "codecs": @codecs.map { |it| it.to_map } } end |