Class: Y2Network::Widgets::InterfaceType
- Inherits:
-
CWM::RadioButtons
- Object
- CWM::RadioButtons
- Y2Network::Widgets::InterfaceType
- Defined in:
- src/lib/y2network/widgets/interface_type.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #help ⇒ Object
- #init ⇒ Object
-
#initialize(default: nil) ⇒ InterfaceType
constructor
A new instance of InterfaceType.
- #items ⇒ Object
- #label ⇒ Object
- #store ⇒ Object
Constructor Details
#initialize(default: nil) ⇒ InterfaceType
Returns a new instance of InterfaceType.
29 30 31 32 33 34 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 29 def initialize(default: nil) super() textdomain "network" # eth as default @default = default || "eth" end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
27 28 29 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 27 def result @result end |
Instance Method Details
#help ⇒ Object
40 41 42 43 44 45 46 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 40 def help # FIXME: help is not helpful _( "<p><b>Device Type</b>. Various device types are available, select \n" \ "one according your needs.</p>" ) end |
#init ⇒ Object
48 49 50 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 48 def init self.value = @default end |
#items ⇒ Object
52 53 54 55 56 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 52 def items Y2Network::InterfaceType.supported.map do |type| [type.short_name, type.to_human_string] end end |
#label ⇒ Object
36 37 38 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 36 def label _("&Device Type") end |
#store ⇒ Object
58 59 60 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 58 def store @result = value end |