Class: CFPropertyList::CFArray

Inherits:
CFType
  • Object
show all
Defined in:
lib/rbCFTypes.rb

Overview

This class contains an array of values

Instance Attribute Summary

Attributes inherited from CFType

#value

Instance Method Summary collapse

Constructor Details

#initialize(val = []) ⇒ CFArray

create a new array CFType



185
186
187
# File 'lib/rbCFTypes.rb', line 185

def initialize(val=[])
  @value = val
end

Instance Method Details

#to_binary(bplist) ⇒ Object

convert to binary



201
202
203
# File 'lib/rbCFTypes.rb', line 201

def to_binary(bplist)
  return bplist.array_to_binary(self)
end

#to_xmlObject

convert to XML



190
191
192
193
194
195
196
197
198
# File 'lib/rbCFTypes.rb', line 190

def to_xml
  n = LibXML::XML::Node.new('array')
  @value.each do
    |v|
    n << v.to_xml
  end

  return n
end