Class: Bitmovin::Encoding::Encodings::StreamInput
- Inherits:
-
Object
- Object
- Bitmovin::Encoding::Encodings::StreamInput
- Defined in:
- lib/bitmovin/encoding/encodings/stream_input.rb
Instance Attribute Summary collapse
-
#encoding_id ⇒ Object
Returns the value of attribute encoding_id.
-
#input_id ⇒ Object
Returns the value of attribute input_id.
-
#input_path ⇒ Object
Returns the value of attribute input_path.
-
#input_stream_id ⇒ Object
Returns the value of attribute input_stream_id.
-
#position ⇒ Object
Returns the value of attribute position.
-
#selection_mode ⇒ Object
Returns the value of attribute selection_mode.
-
#stream_id ⇒ Object
Returns the value of attribute stream_id.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(encoding_id, stream_id, hash) ⇒ StreamInput
constructor
A new instance of StreamInput.
- #invalid? ⇒ Boolean
- #to_json(args) ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(encoding_id, stream_id, hash) ⇒ StreamInput
Returns a new instance of StreamInput.
3 4 5 6 7 8 9 10 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 3 def initialize(encoding_id, stream_id, hash) @errors = [] @encoding_id = encoding_id @stream_id = stream_id hash.each do |name, value| instance_variable_set("@#{ActiveSupport::Inflector.underscore(name)}", value) end end |
Instance Attribute Details
#encoding_id ⇒ Object
Returns the value of attribute encoding_id.
12 13 14 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 12 def encoding_id @encoding_id end |
#input_id ⇒ Object
Returns the value of attribute input_id.
13 14 15 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 13 def input_id @input_id end |
#input_path ⇒ Object
Returns the value of attribute input_path.
13 14 15 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 13 def input_path @input_path end |
#input_stream_id ⇒ Object
Returns the value of attribute input_stream_id.
13 14 15 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 13 def input_stream_id @input_stream_id end |
#position ⇒ Object
Returns the value of attribute position.
13 14 15 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 13 def position @position end |
#selection_mode ⇒ Object
Returns the value of attribute selection_mode.
13 14 15 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 13 def selection_mode @selection_mode end |
#stream_id ⇒ Object
Returns the value of attribute stream_id.
12 13 14 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 12 def stream_id @stream_id end |
Instance Method Details
#errors ⇒ Object
24 25 26 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 24 def errors @errors end |
#invalid? ⇒ Boolean
20 21 22 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 20 def invalid? !valid? end |
#to_json(args) ⇒ Object
28 29 30 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 28 def to_json(args) collect_attributes.to_json(args) end |
#valid? ⇒ Boolean
15 16 17 18 |
# File 'lib/bitmovin/encoding/encodings/stream_input.rb', line 15 def valid? validate! @errors.empty? end |