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



45
46
47
# File 'lib/rbCFTypes.rb', line 45

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

#to_xmlObject

convert to XML



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

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