Class: WsCee::Subject

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subject_info_hash) ⇒ Subject

Returns a new instance of Subject.



8
9
10
11
12
13
14
15
# File 'lib/ws_cee_client/subject.rb', line 8

def initialize(subject_info_hash)
  @name = subject_info_hash[:name]
  @address = subject_info_hash[:address]
  @registration_id = subject_info_hash[:registration_id]
  @date_of_birth = subject_info_hash[:date_of_birth]
rescue NoMethodError
  raise WsCee::ParsingError
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



4
5
6
# File 'lib/ws_cee_client/subject.rb', line 4

def address
  @address
end

#date_of_birthObject (readonly)

Returns the value of attribute date_of_birth.



6
7
8
# File 'lib/ws_cee_client/subject.rb', line 6

def date_of_birth
  @date_of_birth
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/ws_cee_client/subject.rb', line 3

def name
  @name
end

#registration_idObject (readonly)

Returns the value of attribute registration_id.



5
6
7
# File 'lib/ws_cee_client/subject.rb', line 5

def registration_id
  @registration_id
end