Class: Eid::Core
- Inherits:
-
Object
show all
- Defined in:
- lib/eid/core.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(identity) ⇒ Core
9
10
11
|
# File 'lib/eid/core.rb', line 9
def initialize(identity)
@identity = identity.to_s
end
|
Instance Attribute Details
#identity ⇒ Object
Returns the value of attribute identity.
7
8
9
|
# File 'lib/eid/core.rb', line 7
def identity
@identity
end
|
Instance Method Details
#age ⇒ Object
17
18
19
|
# File 'lib/eid/core.rb', line 17
def age
Date.today.year - birth_date&.year.to_i
end
|
#gender ⇒ Object
13
14
15
|
# File 'lib/eid/core.rb', line 13
def gender
female? ? :female : :male
end
|