Sha256: fc9b46d7c567b69ee198ef2900e8f42b3d26c5ac84c1328f32d1fb598cdafd60

Contents?: true

Size: 302 Bytes

Versions: 1

Compression:

Stored size: 302 Bytes

Contents

# frozen_string_literal: true

require 'date'

module Eid
  class Core
    attr_accessor :identity

    def initialize(identity)
      @identity = identity.to_s
    end

    def gender
      female? ? :female : :male
    end

    def age
      Date.today.year - birth_date&.year.to_i
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
e-id-0.3.0 lib/eid/core.rb