Class: Chem::CDX::Uint32
- Inherits:
-
Object
- Object
- Chem::CDX::Uint32
- 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) ⇒ Uint32
constructor
A new instance of Uint32.
- #to_bin ⇒ Object
- #to_xml ⇒ Object
Constructor Details
#initialize(num) ⇒ Uint32
Returns a new instance of Uint32.
946 |
# File 'lib/chem/db/cdx.rb', line 946 def initialize num ; @num = num ; end |
Instance Attribute Details
#num ⇒ Object (readonly)
Returns the value of attribute num.
944 945 946 |
# File 'lib/chem/db/cdx.rb', line 944 def num @num end |
Instance Method Details
#to_bin ⇒ Object
950 |
# File 'lib/chem/db/cdx.rb', line 950 def to_bin ; [@num].pack('V') ; end |
#to_xml ⇒ Object
948 |
# File 'lib/chem/db/cdx.rb', line 948 def to_xml ; @num.to_s ; end |