Class: Shoes::KeyEvent

Inherits:
Object
  • Object
show all
Defined in:
shoes-core/lib/shoes/key_event.rb

Direct Known Subclasses

Keypress, Keyrelease

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, &blk) ⇒ KeyEvent

Returns a new instance of KeyEvent.



5
6
7
8
# File 'shoes-core/lib/shoes/key_event.rb', line 5

def initialize(app, &blk)
  @app = app
  @gui = Shoes.backend_for self, &blk
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



10
11
12
# File 'shoes-core/lib/shoes/key_event.rb', line 10

def app
  @app
end

Instance Method Details

#removeObject



12
13
14
# File 'shoes-core/lib/shoes/key_event.rb', line 12

def remove
  @gui.remove
end