Class: Chem::CDX::Uint16

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(num) ⇒ Uint16

Returns a new instance of Uint16.



969
970
971
# File 'lib/chem/db/cdx.rb', line 969

def initialize num
  @num = num
end

Instance Attribute Details

#numObject (readonly)

Returns the value of attribute num.



967
968
969
# File 'lib/chem/db/cdx.rb', line 967

def num
  @num
end

Instance Method Details

#to_binObject



974
# File 'lib/chem/db/cdx.rb', line 974

def to_bin ;    [@num].pack('v') ;  end

#to_xmlObject



973
# File 'lib/chem/db/cdx.rb', line 973

def to_xml ;    @num.to_s        ; end