Class: DoubleOrNothing::Person
- Inherits:
-
Object
- Object
- DoubleOrNothing::Person
- Defined in:
- lib/double_or_nothing/person.rb
Instance Attribute Summary collapse
-
#birthday ⇒ Object
readonly
Returns the value of attribute birthday.
Instance Method Summary collapse
-
#initialize(birthday) ⇒ Person
constructor
A new instance of Person.
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
#birthday ⇒ Object (readonly)
Returns the value of attribute birthday.
5 6 7 |
# File 'lib/double_or_nothing/person.rb', line 5 def birthday @birthday end |