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.



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

#handleObject



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

#initObject



97
98
99
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 97

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

#labelObject



85
86
87
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 85

def label
  _("De&lete")
end