Class: Y2Network::Widgets::RenamingMechanism
- Inherits:
-
CWM::CustomWidget
- Object
- CWM::CustomWidget
- Y2Network::Widgets::RenamingMechanism
- Defined in:
- src/lib/y2network/widgets/renaming_mechanism.rb
Overview
This class allows the user to select which hardware information should be taken into account when renaming a device
Instance Attribute Summary collapse
-
#result ⇒ Symbol
readonly
Renaming mechanism.
Instance Method Summary collapse
- #contents ⇒ Object
- #init ⇒ Object
-
#initialize(builder) ⇒ RenamingMechanism
constructor
Constructor.
- #store ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(builder) ⇒ RenamingMechanism
Constructor
35 36 37 38 39 40 41 42 43 44 45 |
# File 'src/lib/y2network/widgets/renaming_mechanism.rb', line 35 def initialize(builder) super() textdomain "network" @builder = builder interface = builder.interface @hwinfo = interface.hardware @mac = @hwinfo.mac @bus_id = @hwinfo.busid @renaming_mechanism = builder.renaming_mechanism || :mac end |
Instance Attribute Details
#result ⇒ Symbol (readonly)
Returns Renaming mechanism.
30 31 32 |
# File 'src/lib/y2network/widgets/renaming_mechanism.rb', line 30 def result @result end |
Instance Method Details
#contents ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'src/lib/y2network/widgets/renaming_mechanism.rb', line 58 def contents Frame( _("Base Udev Rule On"), RadioButtonGroup( Id(:udev_type), VBox( # make sure there is enough space (#367239) HSpacing(30), * ) ) ) end |
#init ⇒ Object
48 49 50 |
# File 'src/lib/y2network/widgets/renaming_mechanism.rb', line 48 def init Yast::UI.ChangeWidget(Id(:udev_type), :Value, @renaming_mechanism) end |
#store ⇒ Object
53 54 55 |
# File 'src/lib/y2network/widgets/renaming_mechanism.rb', line 53 def store @builder.renaming_mechanism = value end |
#value ⇒ Object
73 74 75 |
# File 'src/lib/y2network/widgets/renaming_mechanism.rb', line 73 def value Yast::UI.QueryWidget(Id(:udev_type), :Value) end |