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.
28 29 30 31 32 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 28 def initialize(default: nil) 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
38 39 40 41 42 43 44 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 38 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
46 47 48 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 46 def init self.value = @default end |
#items ⇒ Object
50 51 52 53 54 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 50 def items Y2Network::InterfaceType.supported.map do |type| [type.short_name, type.to_human_string] end end |
#label ⇒ Object
34 35 36 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 34 def label _("&Device Type") end |
#store ⇒ Object
56 57 58 |
# File 'src/lib/y2network/widgets/interface_type.rb', line 56 def store @result = value end |