Class: Imposter::Noun

Inherits:
Object
  • Object
show all
Defined in:
lib/imposter/noun.rb

Overview

Based on Faker::Lorem

Constant Summary collapse

Nouns =
%w(alarm animal aunt bait balloon bath bead beam bean bedroom boot  bread  brick  brother  camp  chicken  children  crook  deer  dock  doctor  downtown  drum  dust  eye  family  father  fight  flesh  food  frog  goose  grade  grandfather  grandmother  grape  grass  hook  horse  jail  jam  kiss  kitten  light  loaf  lock  lunch  lunchroom  meal  mother  notebook  owl  pail  parent  park  plot  rabbit  rake  robin  sack  sail  scale  sea  sister  soap  song  spark  space  spoon  spot  spy  summer  tiger  toad  town  trail  tramp  tray  trick  trip  uncle  vase  winter  water  week  wheel  wish  wool  yard  zebra)

Class Method Summary collapse

Class Method Details

.multiple(word_count = 2) ⇒ Object



10
11
12
# File 'lib/imposter/noun.rb', line 10

def self.multiple(word_count = 2)
  one(word_count).join(' ').capitalize
end

.one(num = 1) ⇒ Object



6
7
8
# File 'lib/imposter/noun.rb', line 6

def self.one(num = 1)
  Nouns.shuffle[0, num]
end