Class: Forgery::Internet
- Inherits:
-
Forgery
- Object
- Forgery
- Forgery::Internet
- Defined in:
- lib/sixarm_ruby_fab/forgery/uri.rb
Overview
Generates random Interet URI information.
Class Method Summary collapse
Class Method Details
.uri ⇒ Object
8 9 10 11 12 |
# File 'lib/sixarm_ruby_fab/forgery/uri.rb', line 8 def self.uri ext = ['com','net','org','edu','gov','mil','au','br','cn','in','it','mx','jp','com.uk','com.au','com.ca'].sample host = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9'].sample(rand(5)+15).join return "http://#{host}.#{ext}" end |