Class: Y2Network::Widgets::EthtoolsOptions

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

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ EthtoolsOptions

Returns a new instance of EthtoolsOptions.


26
27
28
29
30
# File 'src/lib/y2network/widgets/ethtools_options.rb', line 26

def initialize(settings)
  textdomain "network"

  @settings = settings
end

Instance Method Details

#helpObject


36
37
38
39
40
41
# File 'src/lib/y2network/widgets/ethtools_options.rb', line 36

def help
  _(
    "<p>If you specify options via <b>Ethtool options</b>, ifup will call " \
      "ethtool with these options.</p>\n"
  )
end

#initObject


47
48
49
# File 'src/lib/y2network/widgets/ethtools_options.rb', line 47

def init
  self.value = @settings.ethtool_options
end

#labelObject


32
33
34
# File 'src/lib/y2network/widgets/ethtools_options.rb', line 32

def label
  _("Ethtool Options")
end

#optObject


43
44
45
# File 'src/lib/y2network/widgets/ethtools_options.rb', line 43

def opt
  [:hstretch]
end

#storeObject


51
52
53
# File 'src/lib/y2network/widgets/ethtools_options.rb', line 51

def store
  @settings.ethtool_options = value
end