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



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_xmlObject

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