Module: FFaker::Company

Extended by:
Company, ModuleUtils
Included in:
Company
Defined in:
lib/ffaker/company.rb

Constant Summary collapse

SUFFIXES =
%w(Inc and\ Sons LLC Group)
POSITION_PREFIXES =
%w(Executive Assistant General Associate)
POSITIONS =
%w(President Manager Director Secretary Consultant)

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore

Instance Method Details

#bsObject

When a straight answer won't do, BS to the rescue! Wordlist from dack.com/web/bullshit.html


32
33
34
# File 'lib/ffaker/company.rb', line 32

def bs
  "#{BS_PRE.sample} #{BS_MID.sample} #{BS_POS.sample}"
end

#catch_phraseObject

Generate a buzzword-laden catch phrase. Wordlist from www.1728.com/buzzword.htm


26
27
28
# File 'lib/ffaker/company.rb', line 26

def catch_phrase
  "#{CATCH_PRE.sample} #{CATCH_MID.sample} #{CATCH_POS.sample}"
end

#nameObject


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

def name
  case rand(3)
  when 0 then "#{Name.last_name} #{suffix}"
  when 1 then "#{Name.last_name}-#{Name.last_name}"
  when 2 then '%s, %s and %s' % [Name.last_name, Name.last_name, Name.last_name]
  end
end

#positionObject


36
37
38
39
40
41
42
# File 'lib/ffaker/company.rb', line 36

def position
  case rand(3)
  when 0 then [POSITION_PREFIXES.sample, POSITIONS.sample]
  when 1 then [POSITION_AREAS.sample, POSITIONS.sample]
  when 2 then [POSITION_PREFIXES.sample, POSITION_AREAS.sample, POSITIONS.sample]
  end.join(' ')
end

#suffixObject


20
21
22
# File 'lib/ffaker/company.rb', line 20

def suffix
  SUFFIXES.sample
end