module Demode::Generator
Public Class Methods
company_domain(id)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# File lib/demode/generator/person.rb, line 11 def email(id) prefix = username(id) suffix = Fields.get(id,:free_emails) [prefix, suffix].join('@') end
name(id)
click to toggle source
# File lib/demode/generator/person.rb, line 5 def name(id) first_name = Fields.get(id,:first_names) last_name = Fields.get(id,:last_names) [first_name, last_name].join(' ') end
username(id)
click to toggle source
# File lib/demode/generator/person.rb, line 17 def username(id) format = Fields.get(id,:username_formats) first_name = Fields.get(id,:first_names) last_name = Fields.get(id,:last_names) format.call(first_name,last_name) end