Class: WsCee::Subject
- Inherits:
-
Object
- Object
- WsCee::Subject
- Defined in:
- lib/ws_cee_client/subject.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#date_of_birth ⇒ Object
readonly
Returns the value of attribute date_of_birth.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#registration_id ⇒ Object
readonly
Returns the value of attribute registration_id.
Instance Method Summary collapse
-
#initialize(subject_info_hash) ⇒ Subject
constructor
A new instance of Subject.
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
#address ⇒ Object (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_birth ⇒ Object (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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/ws_cee_client/subject.rb', line 3 def name @name end |
#registration_id ⇒ Object (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 |