Sha256: f12794abdf089b9fcd43af6ba1c8570b422a94c57d65f408d2d20eb89c8848a8

Contents?: true

Size: 710 Bytes

Versions: 6

Compression:

Stored size: 710 Bytes

Contents

# encoding: utf-8

module FFaker
  # 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 = %w[jammeh ceesay].freeze

    def first_name_female
      fetch_sample(FIRST_NAMES_FEMALE)
    end

    def first_name_male
      fetch_sample(FIRST_NAMES_MALE)
    end

    def last_name
      fetch_sample(LAST_NAMES)
    end

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

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

    def name
      case rand(0..1)
      when 1 then name_male
      else name_female
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ffaker-2.11.0 lib/ffaker/name_ga.rb
ffaker-2.10.0 lib/ffaker/name_ga.rb
ffaker-2.9.0 lib/ffaker/name_ga.rb
ffaker-2.8.1 lib/ffaker/name_ga.rb
ffaker-2.8.0 lib/ffaker/name_ga.rb
ffaker-2.7.0 lib/ffaker/name_ga.rb