Class: Bitmovin::Encoding::Encodings::Muxings::Drms::DrmMuxingResource
- Inherits:
-
Resource
- Object
- Resource
- Bitmovin::Encoding::Encodings::Muxings::Drms::DrmMuxingResource
- Defined in:
- lib/bitmovin/encoding/encodings/muxings/drms/drm_muxing_resource.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#encoding_id ⇒ Object
Returns the value of attribute encoding_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#modified_at ⇒ Object
Returns the value of attribute modified_at.
-
#muxing_id ⇒ Object
Returns the value of attribute muxing_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#outputs ⇒ Object
Returns the value of attribute outputs.
Instance Method Summary collapse
- #build_output(opts = {}) ⇒ Object
-
#initialize(encoding_id, muxing_id, hash = {}) ⇒ DrmMuxingResource
constructor
A new instance of DrmMuxingResource.
Methods inherited from Resource
#delete!, find, init, #init_instance, #inspect, list, #persisted?, #save!
Methods included from Helpers
#camelize_hash, #hash_to_struct, result, #result, #underscore_hash
Constructor Details
#initialize(encoding_id, muxing_id, hash = {}) ⇒ DrmMuxingResource
Returns a new instance of DrmMuxingResource.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/bitmovin/encoding/encodings/muxings/drms/drm_muxing_resource.rb', line 8 def initialize(encoding_id, muxing_id, hash = {}) hsh = ActiveSupport::HashWithIndifferentAccess.new(underscore_hash(hash)) @encoding_id = encoding_id @muxing_id = muxing_id muxing_type = self.class.name.demodulize.gsub(/(.*)Muxing.*/, '\1').downcase encryption_type = self.class.name.demodulize.gsub(/.*Muxing(.*)Encryption/, '\1').downcase init_instance(File.join("/v1/encoding/encodings/", encoding_id, "muxings", muxing_type, muxing_id, "drm", encryption_type)) super(hsh) @outputs = (hsh[:outputs] || []).map do |output| Bitmovin::Encoding::StreamOutput.new(output) end end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/bitmovin/encoding/encodings/muxings/drms/drm_muxing_resource.rb', line 3 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/bitmovin/encoding/encodings/muxings/drms/drm_muxing_resource.rb', line 3 def description @description end |
#encoding_id ⇒ Object
Returns the value of attribute encoding_id.
4 5 6 |
# File 'lib/bitmovin/encoding/encodings/muxings/drms/drm_muxing_resource.rb', line 4 def encoding_id @encoding_id end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/bitmovin/encoding/encodings/muxings/drms/drm_muxing_resource.rb', line 5 def id @id end |
#modified_at ⇒ Object
Returns the value of attribute modified_at.
3 4 5 |
# File 'lib/bitmovin/encoding/encodings/muxings/drms/drm_muxing_resource.rb', line 3 def modified_at @modified_at end |
#muxing_id ⇒ Object
Returns the value of attribute muxing_id.
4 5 6 |
# File 'lib/bitmovin/encoding/encodings/muxings/drms/drm_muxing_resource.rb', line 4 def muxing_id @muxing_id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/bitmovin/encoding/encodings/muxings/drms/drm_muxing_resource.rb', line 3 def name @name end |
#outputs ⇒ Object
Returns the value of attribute outputs.
6 7 8 |
# File 'lib/bitmovin/encoding/encodings/muxings/drms/drm_muxing_resource.rb', line 6 def outputs @outputs end |
Instance Method Details
#build_output(opts = {}) ⇒ Object
21 22 23 24 25 |
# File 'lib/bitmovin/encoding/encodings/muxings/drms/drm_muxing_resource.rb', line 21 def build_output(opts = {}) output = Bitmovin::Encoding::StreamOutput.new(opts) @outputs << output output end |