Sha256: b88484d18388ed25d328ad36a936978e004e3c09974fa7270c37554eb552d50c

Contents?: true

Size: 554 Bytes

Versions: 12

Compression:

Stored size: 554 Bytes

Contents

# frozen_string_literal: true

module FFaker
  module NameIT
    extend ModuleUtils
    extend self

    PREFIX = %w[Sig. Sig.ra Sig.na Dr. Dott. Dott.ssa Prof. Prof.ssa].freeze

    # randomized? (ITALIAN)  prefix!
    #
    def prefix
      fetch_sample(PREFIX)
    end

    def last_name
      fetch_sample(LAST_NAMES)
    end

    def first_name
      fetch_sample(FIRST_NAMES)
    end

    def name
      case rand(0..9)
      when 5, 7 then "#{prefix} #{first_name} #{last_name}"
      else "#{first_name} #{last_name}"
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ffaker-2.23.0 lib/ffaker/name_it.rb
ffaker-2.22.0 lib/ffaker/name_it.rb
ffaker-2.21.0 lib/ffaker/name_it.rb
ffaker-2.20.0 lib/ffaker/name_it.rb
ffaker-2.19.0 lib/ffaker/name_it.rb
ffaker-2.18.0 lib/ffaker/name_it.rb
ffaker-2.17.0 lib/ffaker/name_it.rb
ffaker-2.16.0 lib/ffaker/name_it.rb
ffaker-2.15.0 lib/ffaker/name_it.rb
ffaker-2.14.0 lib/ffaker/name_it.rb
ffaker-2.13.0 lib/ffaker/name_it.rb
ffaker-2.12.0 lib/ffaker/name_it.rb