Class: Chem::CDX::CDXObjectIDArray

Inherits:
Object
  • Object
show all
Defined in:
lib/chem/db/cdx.rb

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ CDXObjectIDArray

Returns a new instance of CDXObjectIDArray.



796
797
798
# File 'lib/chem/db/cdx.rb', line 796

def initialize array
  @array = array
end

Instance Method Details

#to_binObject



804
805
806
# File 'lib/chem/db/cdx.rb', line 804

def to_bin
  @array.pack('V')
end

#to_xmlObject



800
801
802
# File 'lib/chem/db/cdx.rb', line 800

def to_xml
  @array.collect{|a| "%d" % a}.join(" ")
end