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 ⇒ Object
convert to XML.
Constructor Details
#initialize(val = []) ⇒ CFArray
create a new array CFType
191 192 193 |
# File 'lib/rbCFTypes.rb', line 191 def initialize(val=[]) @value = val end |
Instance Method Details
#to_binary(bplist) ⇒ Object
convert to binary
205 206 207 |
# File 'lib/rbCFTypes.rb', line 205 def to_binary(bplist) bplist.array_to_binary(self) end |
#to_xml ⇒ Object
convert to XML
196 197 198 199 200 201 202 |
# File 'lib/rbCFTypes.rb', line 196 def to_xml n = LibXML::XML::Node.new('array') @value.each do |v| n << v.to_xml end n end |