Class: DoubleOrNothing::Person

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(birthday) ⇒ Person

Returns a new instance of Person.



7
8
9
10
# File 'lib/double_or_nothing/person.rb', line 7

def initialize(birthday)
  birthday = Date.parse(birthday) unless birthday.is_a?(Date)
  @birthday = birthday
end

Instance Attribute Details

#birthdayObject (readonly)

Returns the value of attribute birthday.



5
6
7
# File 'lib/double_or_nothing/person.rb', line 5

def birthday
  @birthday
end