Class: Rafflesia::ResidueRange

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

Constant Summary collapse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ResidueRange

Returns a new instance of ResidueRange.



19
20
21
22
23
24
25
# File 'lib/rafflesia/proteins/residue_range.rb', line 19

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

Instance Attribute Details

#chain_idObject

Returns the value of attribute chain_id.



14
15
16
# File 'lib/rafflesia/proteins/residue_range.rb', line 14

def chain_id
  @chain_id
end

#endObject

Returns the value of attribute end.



14
15
16
# File 'lib/rafflesia/proteins/residue_range.rb', line 14

def end
  @end
end

#startObject

Returns the value of attribute start.



14
15
16
# File 'lib/rafflesia/proteins/residue_range.rb', line 14

def start
  @start
end