Class: Rafflesia::MoleculeFingerprint

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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

#bitsObject

Returns the value of attribute bits.



14
15
16
# File 'lib/rafflesia/molecules/molecule_fingerprint.rb', line 14

def bits
  @bits
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/rafflesia/molecules/molecule_fingerprint.rb', line 14

def name
  @name
end

#on_bitsObject

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