Class: Activepesel::PersonalData

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

Instance Method Summary collapse

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_birthObject (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

#sexObject (readonly)

Returns the value of attribute sex.



12
13
14
# File 'lib/activepesel/personal_data.rb', line 12

def sex
  @sex
end