Sha256: 482e75459debacb57e1570da6a4c2e153a859b7b8263546c28c3e0df57568952

Contents?: true

Size: 846 Bytes

Versions: 1

Compression:

Stored size: 846 Bytes

Contents

# frozen_string_literal: true

module Faker
  class Blood < Base
    flexible :blood

    class << self
      ##
      # Produces a random blood type.
      #
      # @return [String]
      #
      # @example
      #   Faker::Blood.type #=> "AB"
      #
      # @faker.version next
      def type
        fetch('blood.type')
      end

      ##
      # Produces a random blood RH-Factor.
      #
      # @return [String]
      #
      # @example
      #   Faker::Blood.rh_factor #=> "-"
      #
      # @faker.version next
      def rh_factor
        fetch('blood.rh_factor')
      end

      ##
      # Produces a random blood group name.
      #
      # @return [String]
      #
      # @example
      #   Faker::Blood.group #=> "AB-"
      #
      # @faker.version next
      def group
        parse('blood.group')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
faker-2.12.0 lib/faker/default/blood.rb