Class: Test03::App

Inherits:
Object
  • Object
show all
Defined in:
lib/ls4/lib/ebus.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApp

Returns a new instance of App.



490
491
492
# File 'lib/ls4/lib/ebus.rb', line 490

def initialize
	@pressed = false
end

Instance Attribute Details

#pressedObject (readonly)

Returns the value of attribute pressed.



505
506
507
# File 'lib/ls4/lib/ebus.rb', line 505

def pressed
  @pressed
end

Instance Method Details

#drawObject



494
495
496
497
498
499
# File 'lib/ls4/lib/ebus.rb', line 494

def draw
	a = Button.new
	a.connect(:on_press, method(:on_press))
	dump_slots(a)
	a
end

#on_pressObject



501
502
503
# File 'lib/ls4/lib/ebus.rb', line 501

def on_press
	@pressed = true
end