Class: CFPropertyList::CFInteger

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

Overview

This class holds integer/fixnum values

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



111
112
113
# File 'lib/cfpropertylist/rbCFTypes.rb', line 111

def to_binary(bplist)
  bplist.num_to_binary(self)
end

#to_plain(plist) ⇒ Object



115
116
117
# File 'lib/cfpropertylist/rbCFTypes.rb', line 115

def to_plain(plist)
  @value.to_s
end

#to_xml(parser) ⇒ Object

convert to XML



104
105
106
107
108
# File 'lib/cfpropertylist/rbCFTypes.rb', line 104

def to_xml(parser)
  n = parser.new_node('integer')
  n = parser.append_node(n, parser.new_text(@value.to_s))
  n
end