lib/ffaker/product.rb in ffaker-1.31.0 vs lib/ffaker/product.rb in ffaker-1.32.0
- old
+ new
@@ -3,10 +3,16 @@
module Faker
module Product
extend ModuleUtils
extend self
+ B2 = %w(nix cell sync func balt sche pod)
+ VOWELS = %w(a e i o u ou ie y io)
+ START = %w(tr br p ph)
+ SUFFIX = %w(ck ns nce nt st ne re ffe ph)
+ ADDON = %w(wood forge func)
+
def brand
case rand(12)
when (0..4) then B1.sample + B2.sample
when (5..10) then "#{START.sample}#{VOWELS.sample}#{SUFFIX.sample}#{ADDON.sample if rand(2)==0}".capitalize
when 11 then "#{letters(2..3)}"
@@ -33,13 +39,7 @@
case rand(2)
when 0 then "#{LETTERS.sample.upcase}#{rand(90)}" # N90
when 1 then "#{letters(1..rand(1..2))}-#{rand(9900)}" # N-9400
end
end
-
- B2 = k %w(nix cell sync func balt sche pod)
- VOWELS = k %w(a e i o u ou ie y io)
- START = k %w(tr br p ph)
- SUFFIX = k %w(ck ns nce nt st ne re ffe ph)
- ADDON = k %w(wood forge func)
end
end