Class: Chem::CDX::Uint16
- Inherits:
-
Object
- Object
- Chem::CDX::Uint16
- 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) ⇒ Uint16
constructor
A new instance of Uint16.
- #to_bin ⇒ Object
- #to_xml ⇒ Object
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
#num ⇒ Object (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_bin ⇒ Object
974 |
# File 'lib/chem/db/cdx.rb', line 974 def to_bin ; [@num].pack('v') ; end |
#to_xml ⇒ Object
973 |
# File 'lib/chem/db/cdx.rb', line 973 def to_xml ; @num.to_s ; end |