Class: UEncode::Overlay
Constant Summary
collapse
- ATTRIBUTES =
[:quadrant]
Instance Method Summary
collapse
included, #initialize, #set_attributes
Instance Method Details
#position ⇒ Object
112
113
114
|
# File 'lib/uencode/elements.rb', line 112
def position
@position
end
|
#position=(_position) ⇒ Object
107
108
109
110
|
# File 'lib/uencode/elements.rb', line 107
def position=(_position)
_position = Position.new(_position) unless _position.instance_of?(Position) || _position.nil?
instance_variable_set :@position, _position
end
|
#source_image ⇒ Object
121
122
123
|
# File 'lib/uencode/elements.rb', line 121
def source_image
@source_image
end
|
#source_image=(_source) ⇒ Object
116
117
118
119
|
# File 'lib/uencode/elements.rb', line 116
def source_image=(_source)
_source = OverlayUrl.new(_source) unless _source.instance_of?(OverlayUrl) || _source.nil?
instance_variable_set :@source_image, _source
end
|
#to_xml ⇒ Object
125
126
127
128
129
130
131
132
133
|
# File 'lib/uencode/elements.rb', line 125
def to_xml
%Q{
<overlay>
#{!source_image.nil? ? source_image.to_xml : ""}
#{!@position.nil? ? @position.to_xml : ""}
#{!quadrant.nil? ? '<quadrant>' + quadrant.to_s + '</quadrant>' : ""}
</overlay>
}
end
|