Class: MemorableStrings::Consonant

Inherits:
Phoneme
  • Object
show all
Defined in:
lib/memorable_strings/consonant.rb

Overview

Represents a phoneme that begins with a consonant letter

Instance Attribute Summary

Attributes inherited from Phoneme

#length, #value

Instance Method Summary collapse

Methods inherited from Phoneme

add, first, #first?, #initialize, #matches?, #print_friendly?, random

Constructor Details

This class inherits a constructor from MemorableStrings::Phoneme

Instance Method Details

#next(stack, maxlength, &block) ⇒ Object

Generates a phoneme of at most the given length that should follow this consononant.

This will always generate a vowel.



10
11
12
# File 'lib/memorable_strings/consonant.rb', line 10

def next(stack, maxlength, &block)
  Vowel.random(maxlength, &block)
end