Class: CFPropertyList::CFString
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
Instance Method Summary collapse
-
#to_binary(bplist) ⇒ Object
convert to binary.
-
#to_xml ⇒ Object
convert to XML.
Methods inherited from CFType
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_xml ⇒ Object
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 |