Class: GlitchIME

Inherits:
Object
  • Object
show all
Defined in:
lib/glitch-ime.rb

Instance Method Summary collapse

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

#generateObject



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