Class: Unit::Types::Beneficiary
- Inherits:
-
Object
- Object
- Unit::Types::Beneficiary
- Defined in:
- lib/unit/types/beneficiary.rb
Instance Attribute Summary collapse
-
#date_of_birth ⇒ Object
readonly
Returns the value of attribute date_of_birth.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
Instance Method Summary collapse
-
#initialize(full_name, date_of_birth = nil) ⇒ Beneficiary
constructor
A new instance of Beneficiary.
- #represent ⇒ Object
Constructor Details
#initialize(full_name, date_of_birth = nil) ⇒ Beneficiary
Returns a new instance of Beneficiary.
11 12 13 14 |
# File 'lib/unit/types/beneficiary.rb', line 11 def initialize(full_name, date_of_birth = nil) @full_name = full_name @date_of_birth = date_of_birth end |
Instance Attribute Details
#date_of_birth ⇒ Object (readonly)
Returns the value of attribute date_of_birth.
7 8 9 |
# File 'lib/unit/types/beneficiary.rb', line 7 def date_of_birth @date_of_birth end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
7 8 9 |
# File 'lib/unit/types/beneficiary.rb', line 7 def full_name @full_name end |
Instance Method Details
#represent ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/unit/types/beneficiary.rb', line 16 def represent payload = { fullName: full_name.represent, dateOfBirth: date_of_birth } payload.compact end |