Class: Y2Network::Widgets::RouteOptions

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

Instance Method Summary collapse

Constructor Details

#initialize(route) ⇒ RouteOptions

Returns a new instance of RouteOptions.

Parameters:

  • route

    route object to get and store options



29
30
31
32
33
34
# File 'src/lib/y2network/widgets/route_options.rb', line 29

def initialize(route)
  super()
  textdomain "network"

  @route = route
end

Instance Method Details

#helpObject



40
41
42
43
44
45
# File 'src/lib/y2network/widgets/route_options.rb', line 40

def help
  _(
    "<p><b>Options</b> specifies additional options for route. It is directly passed " \
    "to <i>ip route add</i> with exception of <i>to</i>,<i>via</i> and <i>dev</i>."
  )
end

#initObject



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

def init
  self.value = @route.options
end

#labelObject



36
37
38
# File 'src/lib/y2network/widgets/route_options.rb', line 36

def label
  Yast::Label.Options
end

#optObject



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

def opt
  [:hstretch]
end

#storeObject



55
56
57
# File 'src/lib/y2network/widgets/route_options.rb', line 55

def store
  @route.options = value
end