Class: CFPropertyList228::CFArray
- Defined in:
- lib/nixenvironment/CFPropertyList228/lib/cfpropertylist/rbCFTypes.rb
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
211 212 213 |
# File 'lib/nixenvironment/CFPropertyList228/lib/cfpropertylist/rbCFTypes.rb', line 211 def initialize(val=[]) @value = val end |
Instance Method Details
#to_binary(bplist) ⇒ Object
convert to binary
225 226 227 |
# File 'lib/nixenvironment/CFPropertyList228/lib/cfpropertylist/rbCFTypes.rb', line 225 def to_binary(bplist) bplist.array_to_binary(self) end |
#to_xml(parser) ⇒ Object
convert to XML
216 217 218 219 220 221 222 |
# File 'lib/nixenvironment/CFPropertyList228/lib/cfpropertylist/rbCFTypes.rb', line 216 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 |