Class: Psychometric::Subject

Inherits:
Object
  • Object
show all
Defined in:
lib/psychometric/subject.rb

Overview

# Subject

This represents someone who undergoes the psychometric assessment. Since different providers identify subjects differently this class can be used to map subjects to your users.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Subject

Returns a new instance of Subject.



10
11
12
13
14
15
16
17
# File 'lib/psychometric/subject.rb', line 10

def initialize(args)
  @country = args[:country]
  @identity = args[:identity]
  @email = args[:email]
  @name = args[:name]
  @gender = args[:gender]
  @title = args[:title]
end

Instance Attribute Details

#countryObject

Returns the value of attribute country.



8
9
10
# File 'lib/psychometric/subject.rb', line 8

def country
  @country
end

#emailObject

Returns the value of attribute email.



8
9
10
# File 'lib/psychometric/subject.rb', line 8

def email
  @email
end

#genderObject

Returns the value of attribute gender.



8
9
10
# File 'lib/psychometric/subject.rb', line 8

def gender
  @gender
end

#identityObject

Returns the value of attribute identity.



8
9
10
# File 'lib/psychometric/subject.rb', line 8

def identity
  @identity
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/psychometric/subject.rb', line 8

def name
  @name
end

#titleObject

Returns the value of attribute title.



8
9
10
# File 'lib/psychometric/subject.rb', line 8

def title
  @title
end

Instance Method Details

#to_sObject



19
20
21
# File 'lib/psychometric/subject.rb', line 19

def to_s
  "\#<Psychometric::Subject name: \"#{@name}\" identity: \"#{@identity}\">"
end