Class: Domain::Birthday
- Inherits:
-
Object
- Object
- Domain::Birthday
- Defined in:
- lib/bas/domain/birthday.rb
Overview
The Domain::Birthday class provides a domain-specific representation of a Birthday object. It encapsulates the individual’s name and their birthdate, offering a structured way to handle and manipulate birthday information.
Constant Summary collapse
- ATTRIBUTES =
%w[individual_name birth_date].freeze
Instance Attribute Summary collapse
-
#birth_date ⇒ Object
readonly
Returns the value of attribute birth_date.
-
#individual_name ⇒ Object
readonly
Returns the value of attribute individual_name.
Instance Method Summary collapse
-
#initialize(individual_name, date) ⇒ Birthday
constructor
Initializes a Domain::Birthday instance with the specified individual name, and date of birth.
Constructor Details
#initialize(individual_name, date) ⇒ Birthday
Initializes a Domain::Birthday instance with the specified individual name, and date of birth.
Params:
-
String
individual_name Name of the individual -
Date
birth_date Birthdate from the individual
20 21 22 23 |
# File 'lib/bas/domain/birthday.rb', line 20 def initialize(individual_name, date) @individual_name = individual_name @birth_date = date end |
Instance Attribute Details
#birth_date ⇒ Object (readonly)
Returns the value of attribute birth_date.
9 10 11 |
# File 'lib/bas/domain/birthday.rb', line 9 def birth_date @birth_date end |
#individual_name ⇒ Object (readonly)
Returns the value of attribute individual_name.
9 10 11 |
# File 'lib/bas/domain/birthday.rb', line 9 def individual_name @individual_name end |