Class: WowzaRest::Data::Application::TranscoderConfig
- Defined in:
- lib/wowza_rest/data/application.rb
Defined Under Namespace
Classes: Template
Instance Attribute Summary collapse
-
#templates ⇒ Object
readonly
Returns the value of attribute templates.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ TranscoderConfig
constructor
A new instance of TranscoderConfig.
- #to_h ⇒ Object
Methods inherited from Base
#define_key_getter, #include?, #keys_reader, #objects_array_to_hash_array, #setup_attributes, #to_json, #wrap_array_objects
Constructor Details
#initialize(attrs = {}) ⇒ TranscoderConfig
Returns a new instance of TranscoderConfig.
37 38 39 40 41 42 43 44 45 |
# File 'lib/wowza_rest/data/application.rb', line 37 def initialize(attrs = {}) if !attrs.nil? && attrs['templates'] keys_reader :templates @templates = wrap_array_objects( attrs.delete('templates')['templates'], Template ) end super(attrs) end |
Instance Attribute Details
#templates ⇒ Object (readonly)
Returns the value of attribute templates.
35 36 37 |
# File 'lib/wowza_rest/data/application.rb', line 35 def templates @templates end |
Instance Method Details
#to_h ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/wowza_rest/data/application.rb', line 47 def to_h super() do |k, arr| if k == :@templates { templates: objects_array_to_hash_array(arr) } else objects_array_to_hash_array(arr) end end end |