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
# File 'src/lib/y2network/widgets/route_options.rb', line 29

def initialize(route)
  textdomain "network"

  @route = route
end

Instance Method Details

#helpObject


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

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


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

def init
  self.value = @route.options
end

#labelObject


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

def label
  Yast::Label.Options
end

#optObject


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

def opt
  [:hstretch]
end

#storeObject


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

def store
  @route.options = value
end