class CFPropertyList::CFArray

This class contains an array of values

Public Class Methods

new(val=[]) click to toggle source

create a new array CFType

# File lib/cfpropertylist/rbCFTypes.rb, line 272
def initialize(val=[])
  @value = val
end

Public Instance Methods

to_binary(bplist) click to toggle source

convert to binary

# File lib/cfpropertylist/rbCFTypes.rb, line 286
def to_binary(bplist)
  bplist.array_to_binary(self)
end
to_plain(plist) click to toggle source
# File lib/cfpropertylist/rbCFTypes.rb, line 290
def to_plain(plist)
  ary = @value.map { |v| v.to_plain(plist) }
  "( " + ary.join(", ") + " )"
end
to_xml(parser) click to toggle source

convert to XML

# File lib/cfpropertylist/rbCFTypes.rb, line 277
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