Class: Quit

Inherits:
MenuItem show all
Defined in:
lib/menuitem.rb

Instance Method Summary collapse

Methods inherited from MenuItem

#button_down, #draw, #select, #unselect

Constructor Details

#initialize(x, y, window) ⇒ Quit

Returns a new instance of Quit.



64
65
66
67
# File 'lib/menuitem.rb', line 64

def initialize(x, y, window)
  super(x, y, window)
  @text = 'Quit'
end

Instance Method Details

#on_enterObject



69
70
71
# File 'lib/menuitem.rb', line 69

def on_enter
  @window.close
end