Class: Y2Network::Presenters::DNSSummary

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Yast::I18n
Defined in:
src/lib/y2network/presenters/dns_summary.rb

Overview

This class converts a DNS configuration object into a string to be used in an AutoYaST summary.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ DNSSummary

Constructor

Parameters:



40
41
42
43
# File 'src/lib/y2network/presenters/dns_summary.rb', line 40

def initialize(config)
  textdomain "network"
  @config = config
end

Instance Attribute Details

#configY2Network::Config (readonly)

Returns:



33
34
35
# File 'src/lib/y2network/presenters/dns_summary.rb', line 33

def config
  @config
end

Instance Method Details

#textObject



45
46
47
48
49
50
# File 'src/lib/y2network/presenters/dns_summary.rb', line 45

def text
  summary = add_hostname("")
  summary = add_nameservers(summary)
  summary = add_searchlist(summary)
  "<ul>#{summary}\n</ul>"
end