Module: FFaker::CompanyIT

Extended by:
CompanyIT, ModuleUtils
Included in:
CompanyIT
Defined in:
lib/ffaker/company_it.rb

Constant Summary collapse

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

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore

Instance Method Details

#nameObject


11
12
13
14
15
16
17
# File 'lib/ffaker/company_it.rb', line 11

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

#prefixObject


23
24
25
# File 'lib/ffaker/company_it.rb', line 23

def prefix
  PREFIXES.sample
end

#suffixObject


19
20
21
# File 'lib/ffaker/company_it.rb', line 19

def suffix
  SUFFIXES.sample
end