Class: Rafflesia::PeptideBondOmegaData

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

Constant Summary collapse

HASH_ATTRS =
{
  bonds: :bonds,
  cis_cutoff: :cis_cutoff,
  included_all_bonds: :included_all_bonds,
  structure_id: :structure_id,
  summary: :summary
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ PeptideBondOmegaData

Returns a new instance of PeptideBondOmegaData.



23
24
25
26
27
28
29
30
31
# File 'lib/rafflesia/proteins/peptide_bond_omega_data.rb', line 23

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @bonds = (hash[:bonds] || []).map { |item| item ? Rafflesia::PeptideBondRecord.new(item) : nil }
  @cis_cutoff = hash[:cis_cutoff]
  @included_all_bonds = hash[:included_all_bonds]
  @structure_id = hash[:structure_id]
  @summary = hash[:summary] ? Rafflesia::PeptideBondSummaryData.new(hash[:summary]) : nil
end

Instance Attribute Details

#bondsObject

Returns the value of attribute bonds.



16
17
18
# File 'lib/rafflesia/proteins/peptide_bond_omega_data.rb', line 16

def bonds
  @bonds
end

#cis_cutoffObject

Returns the value of attribute cis_cutoff.



16
17
18
# File 'lib/rafflesia/proteins/peptide_bond_omega_data.rb', line 16

def cis_cutoff
  @cis_cutoff
end

#included_all_bondsObject

Returns the value of attribute included_all_bonds.



16
17
18
# File 'lib/rafflesia/proteins/peptide_bond_omega_data.rb', line 16

def included_all_bonds
  @included_all_bonds
end

#structure_idObject

Returns the value of attribute structure_id.



16
17
18
# File 'lib/rafflesia/proteins/peptide_bond_omega_data.rb', line 16

def structure_id
  @structure_id
end

#summaryObject

Returns the value of attribute summary.



16
17
18
# File 'lib/rafflesia/proteins/peptide_bond_omega_data.rb', line 16

def summary
  @summary
end