Sha256: 9e7799d494643b5af8b96ecee4de0fcd31990d5915588f317976d94977e8dd09

Contents?: true

Size: 657 Bytes

Versions: 6

Compression:

Stored size: 657 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.unextend
  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.unextend
  end

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

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
forgery-0.5.0 lib/forgery/forgery/internet.rb
forgery-0.4.4 lib/forgery/forgery/internet.rb
forgery-0.4.3 lib/forgery/forgery/internet.rb
forgery-0.4.2 lib/forgery/forgery/internet.rb
forgery-0.4.1 lib/forgery/forgery/internet.rb
forgery-0.4.0 lib/forgery/forgery/internet.rb