Class: Y2Network::Widgets::DeleteRoute

Inherits:
CWM::PushButton
  • Object
show all
Defined in:
src/lib/y2network/widgets/routing_buttons.rb

Instance Method Summary collapse

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

#handleObject


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

#initObject


94
95
96
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 94

def init
  disable if @table&.config&.backend?(:network_manager)
end

#labelObject


82
83
84
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 82

def label
  _("De&lete")
end