Class: Domain::Birthday

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_dateObject (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_nameObject (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