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
200 201 202 |
# File 'lib/rbCFTypes.rb', line 200 def initialize(val=[]) @value = val end |
Instance Method Details
#to_binary(bplist) ⇒ Object
convert to binary
214 215 216 |
# File 'lib/rbCFTypes.rb', line 214 def to_binary(bplist) bplist.array_to_binary(self) end |
#to_xml(parser) ⇒ Object
convert to XML
205 206 207 208 209 210 211 |
# File 'lib/rbCFTypes.rb', line 205 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 |