Class: Hut::Input

Inherits:
Object
  • Object
show all
Defined in:
lib/hut/input.rb

Instance Method Summary collapse

Constructor Details

#initialize(window) ⇒ Input

Returns a new instance of Input.



4
5
6
7
# File 'lib/hut/input.rb', line 4

def initialize(window)
  @window = window
  listen
end

Instance Method Details

#listenObject



9
10
11
12
13
# File 'lib/hut/input.rb', line 9

def listen
  @input = Thread.new do
    @window.new_message gets
  end
end