lib/ffaker/internet_se.rb in ffaker-1.24.0 vs lib/ffaker/internet_se.rb in ffaker-1.25.0
- old
+ new
@@ -96,11 +96,18 @@
def ip_v4_address
(1..4).map { BYTE.random_pick(1) }.join(".")
end
+ def slug(words = nil, glue = nil)
+ glue ||= SLUG_DELIMITERS.rand
+
+ (words || Faker::Lorem::words(2).join(' ')).gsub(' ', glue).downcase
+ end
+
BYTE = k((0..255).to_a.map { |n| n.to_s })
HOSTS = k %w(gmail.com yahoo.com hotmail.com spray.se passagen.se)
DOMAIN_SUFFIXES = k %w(se nu com)
DISPOSABLE_HOSTS = k %w(mailinator.com suremail.info spamherelots.com binkmail.com safetymail.info)
+ SLUG_DELIMITERS = k %w[- _ .]
end
end