Class: ProveUru::PersonalData

Inherits:
Object
  • Object
show all
Defined in:
lib/prove_uru/personal_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dobObject

Returns the value of attribute dob.



2
3
4
# File 'lib/prove_uru/personal_data.rb', line 2

def dob
  @dob
end

#emailObject

Returns the value of attribute email.



2
3
4
# File 'lib/prove_uru/personal_data.rb', line 2

def email
  @email
end

#forenameObject

Returns the value of attribute forename.



2
3
4
# File 'lib/prove_uru/personal_data.rb', line 2

def forename
  @forename
end

#genderObject

Returns the value of attribute gender.



2
3
4
# File 'lib/prove_uru/personal_data.rb', line 2

def gender
  @gender
end

#middlenameObject

Returns the value of attribute middlename.



2
3
4
# File 'lib/prove_uru/personal_data.rb', line 2

def middlename
  @middlename
end

#surnameObject

Returns the value of attribute surname.



2
3
4
# File 'lib/prove_uru/personal_data.rb', line 2

def surname
  @surname
end

#titleObject

Returns the value of attribute title.



2
3
4
# File 'lib/prove_uru/personal_data.rb', line 2

def title
  @title
end

Instance Method Details

#to_prove_hashObject



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/prove_uru/personal_data.rb', line 4

def to_prove_hash
  {
    "Title" => self.title, 
    "Forename" => self.forename, 
    "MiddleName" => self.middlename, 
    "Surname" => self.surname, 
    "Gender" => self.gender.blank? ? "Unknown" : self.gender, 
    "DOBDay" => self.dob.blank? ? "" : self.dob.day, 
    "DOBMonth" => self.dob.blank? ? "" : self.dob.month, 
    "DOBYear" => self.dob.blank? ? "" : self.dob.year, 
    "Email" => self.email
  }
end