Class: Test04::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.



528
529
530
# File 'lib/ls4/lib/ebus.rb', line 528

def initialize
	@pressed = false
end

Instance Attribute Details

#pressedObject (readonly)

Returns the value of attribute pressed.



543
544
545
# File 'lib/ls4/lib/ebus.rb', line 543

def pressed
  @pressed
end

Instance Method Details

#drawObject



532
533
534
535
536
537
# File 'lib/ls4/lib/ebus.rb', line 532

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

#on_pressObject



539
540
541
# File 'lib/ls4/lib/ebus.rb', line 539

def on_press
	@pressed = true
end