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



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

def self.multiple(word_count = 2)
  Nouns.shuffle[0, word_count].join(" ").capitalize
end

.oneObject



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

def self.one
  Nouns.rand
end