Module: Demode::Generator
- Defined in:
- lib/demode/generator/person.rb,
lib/demode/generator/company.rb
Class Method Summary collapse
- .company_domain(id) ⇒ Object
- .company_name(id) ⇒ Object
- .email(id) ⇒ Object
- .name(id) ⇒ Object
- .username(id) ⇒ Object
Class Method Details
.company_domain(id) ⇒ Object
11 12 13 14 |
# File 'lib/demode/generator/company.rb', line 11 def company_domain(id) domain_suffix = Fields.get(id,:domain_suffixes) [company_name(id).downcase, domain_suffix].join('.') end |
.company_name(id) ⇒ Object
5 6 7 8 9 |
# File 'lib/demode/generator/company.rb', line 5 def company_name(id) first_name = Fields.get(id,:company_names) last_name = Fields.get(id,:company_suffixes) [first_name, last_name].join(' ') end |
.email(id) ⇒ Object
11 12 13 14 15 |
# File 'lib/demode/generator/person.rb', line 11 def email(id) prefix = username(id) suffix = Fields.get(id,:free_emails) [prefix, suffix].join('@') end |