Module: FFaker::CompanySE

Extended by:
CompanySE, ModuleUtils
Included in:
CompanySE
Defined in:
lib/ffaker/company_se.rb

Constant Summary collapse

SUFFIXES =
%w[AB Aktiebolag Ab].freeze

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Instance Method Details

#nameObject


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

def name
  case rand(0..3)
  when 0 then "#{NameSE.last_name} #{suffix}"
  when 1 then "#{NameSE.last_name}-#{NameSE.last_name}"
  when 2 then "#{NameSE.last_name}-#{NameSE.last_name} #{suffix}"
  when 3 then "#{NameSE.last_name}, #{NameSE.last_name} och #{NameSE.last_name}"
  end
end

#suffixObject


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

def suffix
  fetch_sample(SUFFIXES)
end