Sha256: c97045180606644686deb8c56daf2ccd068d0315a73ad708508c54cbaf3d68f3

Contents?: true

Size: 286 Bytes

Versions: 1

Compression:

Stored size: 286 Bytes

Contents

# frozen_string_literal: true

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.2.0 lib/eid/core.rb