Class: Quincy::Patient

Inherits:
Struct
  • Object
show all
Defined in:
lib/quincy.rb

Overview

a Struct containing patient information

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#first_nameObject

Returns the value of attribute first_name

Returns:

  • (Object)

    the current value of first_name



11
12
13
# File 'lib/quincy.rb', line 11

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name

Returns:

  • (Object)

    the current value of last_name



11
12
13
# File 'lib/quincy.rb', line 11

def last_name
  @last_name
end

#nrObject

Returns the value of attribute nr

Returns:

  • (Object)

    the current value of nr



11
12
13
# File 'lib/quincy.rb', line 11

def nr
  @nr
end

Instance Method Details

#nameObject



16
17
18
# File 'lib/quincy.rb', line 16

def name
  [last_name, first_name].join(", ");
end

#to_sObject



12
13
14
# File 'lib/quincy.rb', line 12

def to_s
  "#{"%6d"%nr}: #{name}"
end