Class: Chem::CDX::CDXBooleanImplied
- Inherits:
-
Object
- Object
- Chem::CDX::CDXBooleanImplied
- Defined in:
- lib/chem/db/cdx.rb
Instance Method Summary collapse
-
#initialize(tf) ⇒ CDXBooleanImplied
constructor
A new instance of CDXBooleanImplied.
- #to_bin ⇒ Object
- #to_xml ⇒ Object
Constructor Details
#initialize(tf) ⇒ CDXBooleanImplied
Returns a new instance of CDXBooleanImplied.
621 622 623 |
# File 'lib/chem/db/cdx.rb', line 621 def initialize tf @bool = tf end |
Instance Method Details
#to_bin ⇒ Object
629 630 631 632 633 634 635 636 |
# File 'lib/chem/db/cdx.rb', line 629 def to_bin if @bool str = [1].pack('c') else str = [0].pack('c') end '' end |
#to_xml ⇒ Object
625 626 627 |
# File 'lib/chem/db/cdx.rb', line 625 def to_xml @bool ? "yes" : "no" end |