Module: Faker::Company
Constant Summary
collapse
- SUFFIXES =
k %w(Inc and\ Sons LLC Group)
- POSITION_PREFIXES =
k %w[Executive Assistant General Associate]
- POSITIONS =
k %w[President Manager Director Secretary Consultant]
Instance Method Summary
collapse
const_missing, k, underscore
Instance Method Details
#bs ⇒ Object
28
29
30
|
# File 'lib/ffakerer/company.rb', line 28
def bs
"#{BS_PRE.rand} #{BS_MID.rand} #{BS_POS.rand}"
end
|
#catch_phrase ⇒ Object
22
23
24
|
# File 'lib/ffakerer/company.rb', line 22
def catch_phrase
"#{CATCH_PRE.rand} #{CATCH_MID.rand} #{CATCH_POS.rand}"
end
|
#name ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/ffakerer/company.rb', line 8
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
32
33
34
35
36
37
38
|
# File 'lib/ffakerer/company.rb', line 32
def position
case rand(3)
when 0 then [POSITION_PREFIXES.rand, POSITIONS.rand]
when 1 then [POSITION_AREAS.rand, POSITIONS.rand]
when 2 then [POSITION_PREFIXES.rand, POSITION_AREAS.rand, POSITIONS.rand]
end.join(' ')
end
|
#suffix ⇒ Object
16
17
18
|
# File 'lib/ffakerer/company.rb', line 16
def suffix
SUFFIXES.rand
end
|