class Mockdata::Words
Constants
- WORDS
Workplace suitable words (but don't take my word for it)
Public Class Methods
four()
click to toggle source
# File lib/mockdata/words.rb, line 19 def self.four "#{two} #{two}" end
one()
click to toggle source
# File lib/mockdata/words.rb, line 7 def self.one WORDS.sample end
pick(number)
click to toggle source
Return _number words
# File lib/mockdata/words.rb, line 24 def self.pick(number) arr = [] 1.upto(number) { arr << WORDS.sample } arr.join(" ") end
some(range)
click to toggle source
Return _range (x..y) words
# File lib/mockdata/words.rb, line 31 def self.some(range) arr = [] count = rand(range) 1.upto(count) { arr << one } arr.join(" ") end
three()
click to toggle source
# File lib/mockdata/words.rb, line 15 def self.three "#{one} #{two}" end
two()
click to toggle source
# File lib/mockdata/words.rb, line 11 def self.two "#{one} #{one}" end