Class: Hut::Input
- Inherits:
-
Object
- Object
- Hut::Input
- Defined in:
- lib/hut/input.rb
Instance Method Summary collapse
-
#initialize(window) ⇒ Input
constructor
A new instance of Input.
- #listen ⇒ Object
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
#listen ⇒ Object
9 10 11 12 13 |
# File 'lib/hut/input.rb', line 9 def listen @input = Thread.new do @window. gets end end |