Class: GlitchIME
- Inherits:
-
Object
- Object
- GlitchIME
- Defined in:
- lib/glitch-ime.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(text) ⇒ GlitchIME
constructor
A new instance of GlitchIME.
Constructor Details
#initialize(text) ⇒ GlitchIME
Returns a new instance of GlitchIME.
7 8 9 |
# File 'lib/glitch-ime.rb', line 7 def initialize(text) @text = text end |
Instance Method Details
#generate ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/glitch-ime.rb', line 11 def generate result = '' patterns.each{|pair| key, values = *pair result += choice(values) } result end |