Class: UEncode::VideoOutput

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/uencode/elements.rb

Constant Summary collapse

ATTRIBUTES =
[:destination, :container]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ VideoOutput

Returns a new instance of VideoOutput.



94
95
96
97
# File 'lib/uencode/elements.rb', line 94

def initialize(options)
  @items = []
  super
end

Instance Attribute Details

#container=(value) ⇒ Object (writeonly)

Sets the attribute container

Parameters:

  • value

    the value to set the attribute container to.



92
93
94
# File 'lib/uencode/elements.rb', line 92

def container=(value)
  @container = value
end

#destination=(value) ⇒ Object (writeonly)

Sets the attribute destination

Parameters:

  • value

    the value to set the attribute destination to.



92
93
94
# File 'lib/uencode/elements.rb', line 92

def destination=(value)
  @destination = value
end

#itemsObject (readonly)

a list of Medium



91
92
93
# File 'lib/uencode/elements.rb', line 91

def items
  @items
end

Instance Method Details

#eachObject



99
100
101
# File 'lib/uencode/elements.rb', line 99

def each
  @items.each { |item|  yield item }
end

#to_xmlObject



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