Class: Y2Network::Widgets::S390PortNumber

Inherits:
CWM::ComboBox
  • Object
show all
Defined in:
src/lib/y2network/widgets/s390_common.rb

Overview

Widget for specifying whether use the port number 0 or 1

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ S390PortNumber

Constructor


108
109
110
111
112
# File 'src/lib/y2network/widgets/s390_common.rb', line 108

def initialize(settings)
  textdomain "network"

  @settings = settings
end

Instance Method Details

#helpObject

See Also:

  • CWM::AbstractWidget

135
136
137
138
# File 'src/lib/y2network/widgets/s390_common.rb', line 135

def help
  _("<p>Choose which physical <b>Port Number</b> on the OSA Adapter " \
    "will be used by this interface. <b>(0 by default)</b></p>")
end

#initObject

See Also:

  • CWM::AbstractWidget

115
116
117
# File 'src/lib/y2network/widgets/s390_common.rb', line 115

def init
  self.value = @settings.port_number.to_s
end

#itemsObject

See Also:

  • CWM::AbstractWidget

125
126
127
# File 'src/lib/y2network/widgets/s390_common.rb', line 125

def items
  [["0", "0"], ["1", "1"]]
end

#labelObject

See Also:

  • CWM::AbstractWidget

120
121
122
# File 'src/lib/y2network/widgets/s390_common.rb', line 120

def label
  _("Port Number")
end

#storeObject

See Also:

  • CWM::AbstractWidget

130
131
132
# File 'src/lib/y2network/widgets/s390_common.rb', line 130

def store
  @settings.port_number = value.to_i
end