Sha256: 9ca0a153932872a049932ac246e0e6a2fd09ec9bc442b1b777b67924368323a0

Contents?: true

Size: 880 Bytes

Versions: 8

Compression:

Stored size: 880 Bytes

Contents

# encoding: utf-8

module Faker

  # Generates names from Gambia West Africa
  # Source: http://www.columbia.edu/~msj42/Common%20Gambian%20First%20Names.htm
  module NameGA
    extend ModuleUtils
    extend self

    LAST_NAMES = k %w(jammeh ceesay)

    def first_name_female
      FIRST_NAMES_FEMALE.rand
    end

    def first_name_male
      FIRST_NAMES_MALE.rand
    end

    def last_name
      LAST_NAMES.rand
    end

    def name_male
      "#{first_name_male} #{last_name}"
    end

    def name_female
      "#{first_name_female} #{last_name}"
    end

    def name
      case rand(10)
      when 9 then name_female
      when 8 then name_male
      when 7 then name_female
      when 6 then name_male
      when 5 then name_female
      when 4 then name_male
      when 3 then name_female
      when 2 then name_male
      else name_female
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
ffaker-1.30.0 lib/ffaker/name_ga.rb
ffaker-1.25.0 lib/ffaker/name_ga.rb
ffaker-1.24.0 lib/ffaker/name_ga.rb
ffakerer-1.0.2 lib/ffakerer/name_ga.rb
ffaker-1.23.0 lib/ffaker/name_ga.rb
ffakerer-1.0.1 lib/ffakerer/name_ga.rb
ffaker-1.22.1 lib/ffaker/name_ga.rb
ffaker-1.22.0 lib/ffaker/name_ga.rb