module Spicy::Corpus

Public Instance Methods

adjective(*args) click to toggle source
# File lib/corpus.rb, line 3
def adjective(*args)
  generate(:adjectives, *args)
end
adverb(*args) click to toggle source
# File lib/corpus.rb, line 15
def adverb(*args)
  generate(:adverbs, *args)
end
format(format) click to toggle source
# File lib/corpus.rb, line 23
def format(format)
  format.gsub(/%([anbv%])/) do
    case $1
    when 'a'
      adjective
    when 'n'
      noun
    when 'b'
      adverb
    when 'v'
      verb
    when '%'
      '%'
    end
  end
end
noun(*args) click to toggle source
# File lib/corpus.rb, line 7
def noun(*args)
  generate(:nouns, *args)
end
pair(separator = '-') click to toggle source
# File lib/corpus.rb, line 19
def pair(separator = '-')
  "#{adjective}#{separator}#{noun}"
end
verb(*args) click to toggle source
# File lib/corpus.rb, line 11
def verb(*args)
  generate(:verbs, *args)
end