Class: PanDomain::Human::BloodClassificationSystem

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/pan_domain/human/blood_classification_system.rb

Overview

Store information about blood clasification systems

Constant Summary collapse

SYSTEMS =
[
  {
    name: 'ABO',
    description: 'A system which group human blood with A, B, O, and AB.'
  },
  {
    name: 'Rhesus',
    description: 'A system which group human blood with Rh- and Rh+.'
  }
].freeze

Class Method Summary collapse

Class Method Details

.aboObject



25
26
27
# File 'app/models/pan_domain/human/blood_classification_system.rb', line 25

def abo
  @abo ||= find_by(name: 'ABO')
end

.rhesusObject



29
30
31
# File 'app/models/pan_domain/human/blood_classification_system.rb', line 29

def rhesus
  @rhesus ||= find_by(name: 'Rhesus')
end