Class: Y2Network::Dialogs::CallbackButton
- Inherits:
-
CWM::PushButton
- Object
- CWM::PushButton
- Y2Network::Dialogs::CallbackButton
- Defined in:
- src/lib/y2network/dialogs/wireless_networks.rb
Overview
Button that runs an custom action when it is clicked
Instance Method Summary collapse
- #handle ⇒ Object
-
#initialize(label, &block) ⇒ CallbackButton
constructor
A new instance of CallbackButton.
- #label ⇒ Object
Constructor Details
#initialize(label, &block) ⇒ CallbackButton
Returns a new instance of CallbackButton.
33 34 35 36 37 |
# File 'src/lib/y2network/dialogs/wireless_networks.rb', line 33 def initialize(label, &block) super() @label = label @block = block end |
Instance Method Details
#handle ⇒ Object
45 46 47 48 49 |
# File 'src/lib/y2network/dialogs/wireless_networks.rb', line 45 def handle @block.call nil end |
#label ⇒ Object
40 41 42 |
# File 'src/lib/y2network/dialogs/wireless_networks.rb', line 40 def label @label end |