Class: Chem::CDX::Int32
- Inherits:
-
Object
- Object
- Chem::CDX::Int32
- Defined in:
- lib/chem/db/cdx.rb
Instance Attribute Summary collapse
-
#num ⇒ Object
readonly
Returns the value of attribute num.
Instance Method Summary collapse
-
#initialize(num) ⇒ Int32
constructor
A new instance of Int32.
- #to_bin ⇒ Object
- #to_xml ⇒ Object
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
#num ⇒ Object (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_bin ⇒ Object
962 |
# File 'lib/chem/db/cdx.rb', line 962 def to_bin ; [@num].pack('v') ;end |
#to_xml ⇒ Object
960 |
# File 'lib/chem/db/cdx.rb', line 960 def to_xml ; @num.to_s ; end |