Module: Faker::Company
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
const_missing, k, underscore
Instance Method Details
#bs ⇒ Object
32
33
34
|
# File 'lib/ffaker/company.rb', line 32
def bs
"#{BS_PRE.sample} #{BS_MID.sample} #{BS_POS.sample}"
end
|
#catch_phrase ⇒ Object
26
27
28
|
# File 'lib/ffaker/company.rb', line 26
def catch_phrase
"#{CATCH_PRE.sample} #{CATCH_MID.sample} #{CATCH_POS.sample}"
end
|
#name ⇒ Object
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
|
#position ⇒ Object
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
|
#suffix ⇒ Object
20
21
22
|
# File 'lib/ffaker/company.rb', line 20
def suffix
SUFFIXES.sample
end
|