Class: Test03::App
- Inherits:
-
Object
- Object
- Test03::App
- Defined in:
- lib/ls4/lib/ebus.rb
Instance Attribute Summary collapse
-
#pressed ⇒ Object
readonly
Returns the value of attribute pressed.
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize ⇒ App
constructor
A new instance of App.
- #on_press ⇒ Object
Constructor Details
#initialize ⇒ App
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
#pressed ⇒ Object (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
#draw ⇒ Object
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_press ⇒ Object
501 502 503 |
# File 'lib/ls4/lib/ebus.rb', line 501 def on_press @pressed = true end |