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