Class: Rubiderella::Person::Birthday

Inherits:
Object
  • Object
show all
Defined in:
lib/rubiderella/person/birthday.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Birthday

Returns a new instance of Birthday.



8
9
10
11
# File 'lib/rubiderella/person/birthday.rb', line 8

def initialize(args)
  @month = args[:month]
  @day = args[:day]
end

Instance Attribute Details

#dayObject (readonly)

Returns the value of attribute day.



6
7
8
# File 'lib/rubiderella/person/birthday.rb', line 6

def day
  @day
end

#monthObject (readonly)

Returns the value of attribute month.



6
7
8
# File 'lib/rubiderella/person/birthday.rb', line 6

def month
  @month
end

Instance Method Details

#dateObject



13
14
15
# File 'lib/rubiderella/person/birthday.rb', line 13

def date
  "#{@month}#{@day}"
end