Sha256: f54c1909dada18f0659c11837e6efca23d641d8e3840d0bd0c5594188cd30663

Contents?: true

Size: 552 Bytes

Versions: 5

Compression:

Stored size: 552 Bytes

Contents

# encoding: utf-8

module Faker
  module CompanyIT
    extend ModuleUtils
    extend self

    PREFIXES = ["Studio Legale", "Studio Tecnico", "Laboratorio"]
    SUFFIXES = %w(S.p.a. s.r.l. s.n.c. Avvocati Architetti Ingegneri)

    def name
      case rand(2)
      when 0 then "#{NameIT.last_name} #{suffix}"
      when 1 then "#{NameIT.last_name} e #{NameIT.last_name} #{suffix}"
      when 2 then "#{prefix} #{NameIT.last_name}"
      end
    end

    def suffix
      SUFFIXES.sample
    end

    def prefix
      PREFIXES.sample
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/ffaker-1.32.1/lib/ffaker/company_it.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/ffaker-1.32.1/lib/ffaker/company_it.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/ffaker-1.32.1/lib/ffaker/company_it.rb
ffaker-1.32.1 lib/ffaker/company_it.rb
ffaker-1.32.0 lib/ffaker/company_it.rb