Sha256: 5876a738ec61616f76b15b9f58cdf9169746b81a84f313e3ebdb043cc8a4239c

Contents?: true

Size: 483 Bytes

Versions: 6

Compression:

Stored size: 483 Bytes

Contents

# encoding: utf-8

require 'ffaker/name'

module Faker
  module NameDE
    include Faker::Name

    extend ModuleUtils
    extend self

    def name
      case rand(10)
      when 0 then "#{prefix} #{first_name} #{last_name}"
      else 	  "#{first_name} #{last_name}"
      end
    end

    def first_name
      FIRST_NAMES.rand
    end

    def last_name
      LAST_NAMES.rand
    end

    def prefix
      PREFIXES.rand
    end

    PREFIXES = k %w(Herr Frau Dr. Prof.)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ffaker-1.30.0 lib/ffaker/name_de.rb
ffaker-1.25.0 lib/ffaker/name_de.rb
ffaker-1.24.0 lib/ffaker/name_de.rb
ffaker-1.23.0 lib/ffaker/name_de.rb
ffaker-1.22.1 lib/ffaker/name_de.rb
ffaker-1.22.0 lib/ffaker/name_de.rb