Class: Chem::CDX::Int32

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(num) ⇒ Int32

Returns a new instance of Int32.



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

def initialize num ; @num = num ; end

Instance Attribute Details

#numObject (readonly)

Returns the value of attribute num.



956
957
958
# File 'lib/chem/db/cdx.rb', line 956

def num
  @num
end

Instance Method Details

#to_binObject



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

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

#to_xmlObject



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

def to_xml ; @num.to_s ; end