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 32 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 27 def initialize(table, config) super() @table = table @config = config textdomain "network" end |
Instance Method Details
#handle ⇒ Object
38 39 40 41 42 43 44 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 38 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
46 47 48 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 46 def init disable if @config.backend?(:network_manager) end |
#label ⇒ Object
34 35 36 |
# File 'src/lib/y2network/widgets/routing_buttons.rb', line 34 def label _("Ad&d") end |