Class: Dingo
- Inherits:
-
Object
- Object
- Dingo
- Defined in:
- lib/dingo.rb
Constant Summary collapse
- DEFAULT_WORD_PATH =
File.("../../dingo.txt", __FILE__)
- SENTENCE_LENGTH =
6
Class Method Summary collapse
- .paragraphs(random: Random.new, source_words: aussie_copy) ⇒ Object
- .reset ⇒ Object
- .sentences(random: Random.new, source_words: aussie_copy) ⇒ Object
- .words(random: Random.new, source_words: aussie_copy) ⇒ Object
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 |
.reset ⇒ Object
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 |