Class: Moby::RandomInputGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/Moby/RandomInputGenerator.rb

Constant Summary collapse

TLD =
%w{com net org edu int mil gov arpa biz aero name coop info pro museum}

Instance Method Summary collapse

Instance Method Details

#random_passwordObject



20
21
22
# File 'lib/Moby/RandomInputGenerator.rb', line 20

def random_password
  random_word
end

#random_usernameObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/Moby/RandomInputGenerator.rb', line 8

def random_username
  if username_is_email_address?
    if @username_hostname
      "#{random_word}@#{@username_hostname}"
    else
      "#{random_word}@#{random_word}.#{random_TLD}"
    end
  else
    random_word
  end
end