Class: Rafflesia::MoleculeFingerprint
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::MoleculeFingerprint
- Defined in:
- lib/rafflesia/molecules/molecule_fingerprint.rb
Constant Summary collapse
- HASH_ATTRS =
{ bits: :bits, name: :name, on_bits: :on_bits }.freeze
Instance Attribute Summary collapse
-
#bits ⇒ Object
Returns the value of attribute bits.
-
#name ⇒ Object
Returns the value of attribute name.
-
#on_bits ⇒ Object
Returns the value of attribute on_bits.
Instance Method Summary collapse
-
#initialize(json) ⇒ MoleculeFingerprint
constructor
A new instance of MoleculeFingerprint.
Constructor Details
#initialize(json) ⇒ MoleculeFingerprint
Returns a new instance of MoleculeFingerprint.
19 20 21 22 23 24 25 |
# File 'lib/rafflesia/molecules/molecule_fingerprint.rb', line 19 def initialize(json) super() hash = self.class.normalize(json) @bits = hash[:bits] @name = hash[:name] @on_bits = (hash[:on_bits] || []) end |
Instance Attribute Details
#bits ⇒ Object
Returns the value of attribute bits.
14 15 16 |
# File 'lib/rafflesia/molecules/molecule_fingerprint.rb', line 14 def bits @bits end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/rafflesia/molecules/molecule_fingerprint.rb', line 14 def name @name end |
#on_bits ⇒ Object
Returns the value of attribute on_bits.
14 15 16 |
# File 'lib/rafflesia/molecules/molecule_fingerprint.rb', line 14 def on_bits @on_bits end |