1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
use ::helper::*;
use ::Fake;
use ::faker::Name;

pub trait Company: Fake + Name {
    #[inline]
    fn suffix() -> &'static str {
        take_one(Self::company_suffix_data())
    }

    #[inline]
    fn name() -> String {
        match gen_range(0, 8) {
            0 => {
                format!("{}-{}",
                        <Self as Name>::last_name(),
                        <Self as Name>::last_name())
            }
            1 | 2 => {
                format!("{}, {} and {}",
                        <Self as Name>::last_name(),
                        <Self as Name>::last_name(),
                        <Self as Name>::last_name())
            }
            _ => {
                format!("{} {}",
                        <Self as Name>::last_name(),
                        <Self as Company>::suffix())
            }
        }
    }

    #[inline]
    fn buzzword() -> &'static str {
        take_one(Self::company_buzzword_head_data())
    }

    #[inline]
    fn catch_phase() -> String {
        let head = take_one(Self::company_buzzword_head_data());
        let middle = take_one(Self::company_buzzword_middle_data());
        let tail = take_one(Self::company_buzzword_tail_data());
        format!("{} {} {}", head, middle, tail)
    }

    #[inline]
    fn bs() -> String {
        let head = take_one(Self::company_bs_verbs_data());
        let middle = take_one(Self::company_bs_adj_data());
        let tail = take_one(Self::company_bs_nonus_data());
        format!("{} {} {}", head, middle, tail)
    }

    #[inline]
    fn profession() -> &'static str {
        take_one(Self::company_profession_data())
    }

    #[inline]
    fn industry() -> &'static str {
        take_one(Self::company_industry_data())
    }
}