Class: Y2Network::Presenters::DNSSummary

Inherits:
Object
  • Object
show all
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(dns) ⇒ DNSSummary

Constructor


38
39
40
41
# File 'src/lib/y2network/presenters/dns_summary.rb', line 38

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

Instance Attribute Details

#dnsY2Network::DNS (readonly)


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

def dns
  @dns
end

Instance Method Details

#textObject


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

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