class PseudoEntity::Randoms::RandomDomains

Public Class Methods

new(nouns, top_level_domains) click to toggle source

nouns.permutation(2).map(&:to_s).product(DOMAINS).map { |x| x.join(‘.’) }

Calls superclass method
# File lib/pseudo_entity/randoms.rb, line 786
def initialize(nouns, top_level_domains)
  @nouns = HugePermutation.new(nouns, 2)
  super(@nouns, top_level_domains)
end

Public Instance Methods

fetch(x) click to toggle source
Calls superclass method
# File lib/pseudo_entity/randoms.rb, line 791
def fetch(x)
  product = super(x)
  nouns = product.first
  "#{nouns.join}.#{product.last}"
end