Class: Chem::CDX::Int8

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(num) ⇒ Int8

Returns a new instance of Int8.



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

def initialize num ; @num = num ; end

Instance Attribute Details

#numObject (readonly)

Returns the value of attribute num.



932
933
934
# File 'lib/chem/db/cdx.rb', line 932

def num
  @num
end

Instance Method Details

#to_binObject



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

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

#to_xmlObject



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

def to_xml ; @num.to_s ; end