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 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 25 def initialize(config) textdomain "network" @config = config end |
Instance Method Details
#help ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 37 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
58 59 60 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 58 def init self.value = @config.ifplugd_priority end |
#label ⇒ Object
31 32 33 34 35 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 31 def label _( "Ifplugd Priority" ) end |
#maximum ⇒ Object
54 55 56 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 54 def maximum 100 end |
#minimum ⇒ Object
50 51 52 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 50 def minimum 0 end |
#store ⇒ Object
62 63 64 |
# File 'src/lib/y2network/widgets/ifplugd_priority.rb', line 62 def store @config.ifplugd_priority = value.to_i if enabled? end |