Class: Y2Network::Widgets::AddRoute
- Inherits:
-
CWM::PushButton
- Object
- CWM::PushButton
- Y2Network::Widgets::AddRoute
- Defined in:
- src/lib/y2network/widgets/routing_buttons.rb
Instance Method Summary collapse
- #handle ⇒ Object
- #init ⇒ Object
-
#initialize(table, config) ⇒ AddRoute
constructor
A new instance of AddRoute.
- #label ⇒ Object
Constructor Details
#initialize(table, config) ⇒ AddRoute
Returns a new instance of AddRoute.
27 28 29 30 31 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 27 def initialize(table, config) @table = table @config = config textdomain "network" end |
Instance Method Details
#handle ⇒ Object
37 38 39 40 41 42 43 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 37 def handle route = Y2Network::Route.new res = Y2Network::Dialogs::Route.run(route, @config.interfaces) @table.add_route(route) if res == :ok nil end |
#init ⇒ Object
45 46 47 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 45 def init disable if @config.backend?(:network_manager) end |
#label ⇒ Object
33 34 35 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 33 def label _("Ad&d") end |