Class: Y2Network::Widgets::DeleteRoute
- Inherits:
-
CWM::PushButton
- Object
- CWM::PushButton
- Y2Network::Widgets::DeleteRoute
- Defined in:
- src/lib/y2network/widgets/routing_buttons.rb
Instance Method Summary collapse
- #handle ⇒ Object
- #init ⇒ Object
-
#initialize(table) ⇒ DeleteRoute
constructor
A new instance of DeleteRoute.
- #label ⇒ Object
Constructor Details
#initialize(table) ⇒ DeleteRoute
Returns a new instance of DeleteRoute.
79 80 81 82 83 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 79 def initialize(table) super() @table = table textdomain "network" end |
Instance Method Details
#handle ⇒ Object
89 90 91 92 93 94 95 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 89 def handle return nil unless @table.selected_route @table.delete_route nil end |
#init ⇒ Object
97 98 99 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 97 def init disable if @table&.config&.backend?(:network_manager) end |
#label ⇒ Object
85 86 87 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 85 def label _("De&lete") end |