Class: Randamu::Account
Constant Summary
collapse
- ALPHABET =
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
- NUMERIC =
'0123456789'
- SPEACIAL =
'!@#$%&*()_+'
NameGenerator::GENDER
Class Method Summary
collapse
custom_name, first_name, full_name, last_name
Methods inherited from Base
load_data
Class Method Details
.email ⇒ Object
18
19
20
|
# File 'lib/randamu/core/account.rb', line 18
def email
"#{normalize(first_name.downcase)}#{generate_connection_symbol}#{normalize(last_name.downcase)}@#{load_data('emails.domains').sample}"
end
|
.password(length: 8, special: true, numeric: true, alphabet: true) ⇒ Object
14
15
16
|
# File 'lib/randamu/core/account.rb', line 14
def password(length: 8, special: true, numeric: true, alphabet: true)
generate_password(length, special, numeric, alphabet)
end
|
.phone(state: Dictionary::STATES.keys.sample, country_code: false) ⇒ Object
22
23
24
25
|
# File 'lib/randamu/core/account.rb', line 22
def phone(state: Dictionary::STATES.keys.sample, country_code: false)
return "+55 (#{load_data("phone.ddd.#{state}").sample}) " + phone_number if country_code
"(#{load_data("phone.ddd.#{state}").sample}) " + phone_number
end
|
.phone_only_numbers(state: Dictionary::STATES.keys.sample, country_code: false) ⇒ Object
27
28
29
30
|
# File 'lib/randamu/core/account.rb', line 27
def phone_only_numbers(state: Dictionary::STATES.keys.sample, country_code: false)
return "55#{load_data("phone.ddd.#{state}").sample}" + phone_number if country_code
"#{load_data("phone.ddd.#{state}").sample}" + phone_number
end
|
.username(type: :default) ⇒ Object
10
11
12
|
# File 'lib/randamu/core/account.rb', line 10
def username(type: :default)
load_data("names.usernames.#{type}").sample
end
|