Sha256: ca0e2305b7f8ee28ca80b2ee50d9721e00de1efca32dbfe083fc2a405e4cedde

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 Bytes

Contents

require_relative 'extensions/time'

module Faker
  module Medical
    class Patient < Base
      class << self
        def date_of_birth
          ::Time.random(:year_range => 80)
          #Date.parse("#{rand(12) + 1}/#{rand(27) + 1}/19#{format("%02d", rand(99))}" )
        end
        alias_method :dob, :date_of_birth

        def gender
          %w[M F].sample
        end

        def phone_number
          Faker::PhoneNumber.phone_number
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
faker-medical-0.5.2 lib/faker/medical/patient.rb