Class: Y2Network::Widgets::IfplugdPriority
- Inherits:
-
CWM::IntField
- Object
- CWM::IntField
- Y2Network::Widgets::IfplugdPriority
- Defined in:
- src/lib/y2network/widgets/ifplugd_priority.rb
Instance Method Summary collapse
- #help ⇒ Object
- #init ⇒ Object
-
#initialize(config) ⇒ IfplugdPriority
constructor
A new instance of IfplugdPriority.
- #label ⇒ Object
- #maximum ⇒ Object
- #minimum ⇒ Object
- #store ⇒ Object
Constructor Details
#initialize(config) ⇒ IfplugdPriority
Returns a new instance of IfplugdPriority.
25 26 27 28 29 30 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 25 def initialize(config) super() textdomain "network" @config = config end |
Instance Method Details
#help ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 38 def help # TRANSLATORS: help text for Ifplugd priority widget _( "<p><b><big>IFPLUGD PRIORITY</big></b></p> \n" \ "<p> All interfaces configured with <b>On Cable Connection</b> " \ "and with IFPLUGD_PRIORITY != 0 will be\n" \ " used mutually exclusive. If more then one of these interfaces " \ "is <b>On Cable Connection</b>\n" \ " then we need a way to decide which interface to take up. Therefore we have to\n" \ " set the priority of each interface. </p>\n" ) end |
#init ⇒ Object
59 60 61 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 59 def init self.value = @config.ifplugd_priority end |
#label ⇒ Object
32 33 34 35 36 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 32 def label _( "Ifplugd Priority" ) end |
#maximum ⇒ Object
55 56 57 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 55 def maximum 100 end |
#minimum ⇒ Object
51 52 53 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 51 def minimum 0 end |
#store ⇒ Object
63 64 65 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 63 def store @config.ifplugd_priority = value.to_i if enabled? end |