Class: Rafflesia::DisulfideDetectData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/disulfide_detect_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  bond_count: :bond_count,
  bonds: :bonds,
  interchain_count: :interchain_count,
  intrachain_count: :intrachain_count,
  left_handed_count: :left_handed_count,
  max_distance: :max_distance,
  right_handed_count: :right_handed_count,
  structure_id: :structure_id
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DisulfideDetectData

Returns a new instance of DisulfideDetectData.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 29

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @bond_count = hash[:bond_count]
  @bonds = (hash[:bonds] || []).map { |item| item ? Rafflesia::DisulfideBondRecord.new(item) : nil }
  @interchain_count = hash[:interchain_count]
  @intrachain_count = hash[:intrachain_count]
  @left_handed_count = hash[:left_handed_count]
  @max_distance = hash[:max_distance]
  @right_handed_count = hash[:right_handed_count]
  @structure_id = hash[:structure_id]
end

Instance Attribute Details

#bond_countObject

Returns the value of attribute bond_count.



19
20
21
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19

def bond_count
  @bond_count
end

#bondsObject

Returns the value of attribute bonds.



19
20
21
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19

def bonds
  @bonds
end

#interchain_countObject

Returns the value of attribute interchain_count.



19
20
21
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19

def interchain_count
  @interchain_count
end

#intrachain_countObject

Returns the value of attribute intrachain_count.



19
20
21
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19

def intrachain_count
  @intrachain_count
end

#left_handed_countObject

Returns the value of attribute left_handed_count.



19
20
21
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19

def left_handed_count
  @left_handed_count
end

#max_distanceObject

Returns the value of attribute max_distance.



19
20
21
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19

def max_distance
  @max_distance
end

#right_handed_countObject

Returns the value of attribute right_handed_count.



19
20
21
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19

def right_handed_count
  @right_handed_count
end

#structure_idObject

Returns the value of attribute structure_id.



19
20
21
# File 'lib/rafflesia/proteins/disulfide_detect_data.rb', line 19

def structure_id
  @structure_id
end