Class: Activepesel::PersonalData
- Inherits:
-
Object
- Object
- Activepesel::PersonalData
- Defined in:
- lib/activepesel/personal_data.rb
Constant Summary collapse
- DELTA =
{ 18 => 80, 19 => 0, 20 => 20, 21 => 40, 22 => 60 }.freeze
Instance Attribute Summary collapse
-
#date_of_birth ⇒ Object
readonly
Returns the value of attribute date_of_birth.
-
#sex ⇒ Object
readonly
Returns the value of attribute sex.
Instance Method Summary collapse
-
#initialize(pesel) ⇒ PersonalData
constructor
A new instance of PersonalData.
Constructor Details
#initialize(pesel) ⇒ PersonalData
Returns a new instance of PersonalData.
15 16 17 |
# File 'lib/activepesel/personal_data.rb', line 15 def initialize(pesel) @date_of_birth, @sex = get_date_of_birth(pesel), get_sex(pesel) end |
Instance Attribute Details
#date_of_birth ⇒ Object (readonly)
Returns the value of attribute date_of_birth.
12 13 14 |
# File 'lib/activepesel/personal_data.rb', line 12 def date_of_birth @date_of_birth end |
#sex ⇒ Object (readonly)
Returns the value of attribute sex.
12 13 14 |
# File 'lib/activepesel/personal_data.rb', line 12 def sex @sex end |