Class: CFPropertyList::CFString
- Defined in:
- lib/cfpropertylist/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
Instance Method Summary collapse
-
#to_binary(bplist) ⇒ Object
convert to binary.
-
#to_xml(parser) ⇒ 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
54 55 56 |
# File 'lib/cfpropertylist/rbCFTypes.rb', line 54 def to_binary(bplist) bplist.string_to_binary(@value); end |
#to_xml(parser) ⇒ Object
convert to XML
47 48 49 50 51 |
# File 'lib/cfpropertylist/rbCFTypes.rb', line 47 def to_xml(parser) n = parser.new_node('string') n = parser.append_node(n, parser.new_text(@value)) unless @value.nil? n end |