Class: Dingo

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

Constant Summary collapse

DEFAULT_WORD_PATH =
File.expand_path("../../dingo.txt", __FILE__)
SENTENCE_LENGTH =
6

Class Method Summary collapse

Class Method Details

.paragraphs(random: Random.new, source_words: aussie_copy) ⇒ Object



16
17
18
# File 'lib/dingo.rb', line 16

def paragraphs(random: Random.new, source_words: aussie_copy)
  infinite_sequence { aussie_paragraph(source_words, random) }
end

.resetObject



20
21
22
23
# File 'lib/dingo.rb', line 20

def reset
  @aussie_copy = nil
  @source_words = nil
end

.sentences(random: Random.new, source_words: aussie_copy) ⇒ Object



12
13
14
# File 'lib/dingo.rb', line 12

def sentences(random: Random.new, source_words: aussie_copy)
  infinite_sequence { aussie_sentence(source_words, random) }
end

.words(random: Random.new, source_words: aussie_copy) ⇒ Object



8
9
10
# File 'lib/dingo.rb', line 8

def words(random: Random.new, source_words: aussie_copy)
  infinite_sequence { aussie_word(source_words, random) }
end