Class: MemorableStrings::Digit
- Defined in:
- lib/memorable_strings/digit.rb
Overview
Represents a single-digit character
Instance Attribute Summary
Attributes inherited from Phoneme
Instance Method Summary collapse
-
#next(stack, maxlength, &block) ⇒ Object
Generates a phoneme of at most the given length that should follow this digit.
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 digit.
This will always randomly generate either a vowel or a consonant.
10 11 12 |
# File 'lib/memorable_strings/digit.rb', line 10 def next(stack, maxlength, &block) Phoneme.first(maxlength, &block) end |