Class: CFPropertyList::CFArray
Overview
This class contains an array of values
Instance Attribute Summary
Attributes inherited from CFType
Instance Method Summary collapse
-
#initialize(val = []) ⇒ CFArray
constructor
create a new array CFType.
-
#to_binary(bplist) ⇒ Object
convert to binary.
-
#to_xml(parser) ⇒ Object
convert to XML.
Constructor Details
#initialize(val = []) ⇒ CFArray
create a new array CFType
204 205 206 |
# File 'lib/rbCFTypes.rb', line 204 def initialize(val=[]) @value = val end |
Instance Method Details
#to_binary(bplist) ⇒ Object
convert to binary
218 219 220 |
# File 'lib/rbCFTypes.rb', line 218 def to_binary(bplist) bplist.array_to_binary(self) end |
#to_xml(parser) ⇒ Object
convert to XML
209 210 211 212 213 214 215 |
# File 'lib/rbCFTypes.rb', line 209 def to_xml(parser) n = parser.new_node('array') @value.each do |v| n = parser.append_node(n, v.to_xml(parser)) end n end |