Sha256: 9b19485c7edc031c24841c36a88ba4b2aa43a40b5d6232b35b9874850903c97e

Contents?: true

Size: 639 Bytes

Versions: 5

Compression:

Stored size: 639 Bytes

Contents

class Forgery::Internet < Forgery

  def self.user_name
    (dictionaries[:male_first_names].random[0,1] + dictionaries[:last_names].random).downcase
  end

  def self.top_level_domain
    dictionaries[:top_level_domains].random
  end

  def self.domain_name
    dictionaries[:company_names].random.downcase + '.' + self.top_level_domain
  end

  def self.email_address
    user_name + '@' + domain_name
  end

  def self.email_subject(options={})
    Forgery::LoremIpsum.title(options)
  end

  def self.cctld
    dictionaries[:country_code_top_level_domains].random
  end

  def self.ip_v4
    (1..4).map{rand(256)}.join('.')
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
forgery-0.3.12 lib/forgery/forgery/internet.rb
forgery-0.3.11 lib/forgery/forgery/internet.rb
forgery-0.3.10 lib/forgery/forgery/internet.rb
forgery-0.3.9 lib/forgery/forgery/internet.rb
forgery-0.3.8 lib/forgery/forgery/internet.rb