class Spicy::Memory::Corpus
Public Class Methods
new()
click to toggle source
# File lib/memory-corpus.rb, line 47 def initialize @lists = {} end
Public Instance Methods
adjectives()
click to toggle source
# File lib/memory-corpus.rb, line 51 def adjectives list(:adjectives).words end
adverbs()
click to toggle source
# File lib/memory-corpus.rb, line 59 def adverbs list(:adverbs).words end
nouns()
click to toggle source
# File lib/memory-corpus.rb, line 55 def nouns list(:nouns).words end
verbs()
click to toggle source
# File lib/memory-corpus.rb, line 63 def verbs list(:verbs).words end
Private Instance Methods
generate(type, *args)
click to toggle source
# File lib/memory-corpus.rb, line 69 def generate(type, *args) list(type).word(*args) end
list(type)
click to toggle source
# File lib/memory-corpus.rb, line 73 def list(type) @lists[type] ||= begin WordList.new(Files.corpus(type)) end end