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.
77 78 79 80 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 77 def initialize(table) @table = table textdomain "network" end |
Instance Method Details
#handle ⇒ Object
86 87 88 89 90 91 92 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 86 def handle return nil unless @table.selected_route @table.delete_route nil end |
#init ⇒ Object
94 95 96 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 94 def init disable if @table&.config&.backend?(:network_manager) end |
#label ⇒ Object
82 83 84 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 82 def label _("De&lete") end |