Class: UEncode::VideoOutput
- Inherits:
-
Object
- Object
- UEncode::VideoOutput
- Includes:
- Enumerable
- Defined in:
- lib/uencode/elements.rb
Constant Summary collapse
- ATTRIBUTES =
[:destination, :container]
Instance Attribute Summary collapse
-
#container ⇒ Object
writeonly
Sets the attribute container.
-
#destination ⇒ Object
writeonly
Sets the attribute destination.
-
#items ⇒ Object
readonly
a list of Medium.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(options) ⇒ VideoOutput
constructor
A new instance of VideoOutput.
- #to_xml ⇒ Object
Constructor Details
#initialize(options) ⇒ VideoOutput
Returns a new instance of VideoOutput.
94 95 96 97 |
# File 'lib/uencode/elements.rb', line 94 def initialize() @items = [] super end |
Instance Attribute Details
#container=(value) ⇒ Object (writeonly)
Sets the attribute container
92 93 94 |
# File 'lib/uencode/elements.rb', line 92 def container=(value) @container = value end |
#destination=(value) ⇒ Object (writeonly)
Sets the attribute destination
92 93 94 |
# File 'lib/uencode/elements.rb', line 92 def destination=(value) @destination = value end |
#items ⇒ Object (readonly)
a list of Medium
91 92 93 |
# File 'lib/uencode/elements.rb', line 91 def items @items end |
Instance Method Details
#each ⇒ Object
99 100 101 |
# File 'lib/uencode/elements.rb', line 99 def each @items.each { |item| yield item } end |
#to_xml ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/uencode/elements.rb', line 103 def to_xml %Q{ <output> <video> <destination>#{destination}</destination> <container>#{container}</container> <media> #{@items.inject("") { |s, item| s << item.to_xml }} </media> </video> </output> } end |