Class: Rafflesia::ResidueInterval

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

Constant Summary collapse

HASH_ATTRS =
{
  chain_id: :chain_id,
  end: :end,
  mean: :mean,
  start: :start
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ResidueInterval

Returns a new instance of ResidueInterval.



21
22
23
24
25
26
27
28
# File 'lib/rafflesia/proteins/residue_interval.rb', line 21

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @chain_id = hash[:chain_id]
  @end = hash[:end]
  @mean = hash[:mean]
  @start = hash[:start]
end

Instance Attribute Details

#chain_idObject

Returns the value of attribute chain_id.



15
16
17
# File 'lib/rafflesia/proteins/residue_interval.rb', line 15

def chain_id
  @chain_id
end

#endObject

Returns the value of attribute end.



15
16
17
# File 'lib/rafflesia/proteins/residue_interval.rb', line 15

def end
  @end
end

#meanObject

Returns the value of attribute mean.



15
16
17
# File 'lib/rafflesia/proteins/residue_interval.rb', line 15

def mean
  @mean
end

#startObject

Returns the value of attribute start.



15
16
17
# File 'lib/rafflesia/proteins/residue_interval.rb', line 15

def start
  @start
end