Class: CFPropertyList::CFReal
- Defined in:
- lib/cfpropertylist/rbCFTypes.rb
Overview
This class holds float values
Instance Attribute Summary
Attributes inherited from CFType
Instance Method Summary collapse
-
#to_binary(bplist) ⇒ Object
convert to binary.
- #to_plain(plist) ⇒ Object
-
#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
130 131 132 |
# File 'lib/cfpropertylist/rbCFTypes.rb', line 130 def to_binary(bplist) bplist.num_to_binary(self) end |
#to_plain(plist) ⇒ Object
134 135 136 |
# File 'lib/cfpropertylist/rbCFTypes.rb', line 134 def to_plain(plist) @value.to_s end |
#to_xml(parser) ⇒ Object
convert to XML
123 124 125 126 127 |
# File 'lib/cfpropertylist/rbCFTypes.rb', line 123 def to_xml(parser) n = parser.new_node('real') n = parser.append_node(n, parser.new_text(@value.to_s)) n end |