Class: CFPropertyList::CFString

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

Overview

This class holds string values, both, UTF-8 and UTF-16BE It will convert the value to UTF-16BE if necessary (i.e. if non-ascii char contained)

Instance Attribute Summary

Attributes inherited from CFType

#value

Instance Method Summary collapse

Methods inherited from CFType

#initialize

Constructor Details

This class inherits a constructor from CFPropertyList::CFType

Instance Method Details

#to_binary(bplist) ⇒ Object

convert to binary



39
40
41
# File 'lib/rbCFTypes.rb', line 39

def to_binary(bplist)
  bplist.string_to_binary(@value);
end

#to_xmlObject

convert to XML



32
33
34
35
36
# File 'lib/rbCFTypes.rb', line 32

def to_xml
  n = LibXML::XML::Node.new('string')
  n << LibXML::XML::Node.new_text(@value) unless @value.nil?
  n
end