Class: Y2Network::Presenters::DNSSummary
- Inherits:
-
Object
- Object
- Y2Network::Presenters::DNSSummary
- 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
- #config ⇒ Y2Network::Config readonly
Instance Method Summary collapse
-
#initialize(config) ⇒ DNSSummary
constructor
Constructor.
- #text ⇒ Object
Constructor Details
#initialize(config) ⇒ DNSSummary
Constructor
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
#config ⇒ Y2Network::Config (readonly)
33 34 35 |
# File 'src/lib/y2network/presenters/dns_summary.rb', line 33 def config @config end |
Instance Method Details
#text ⇒ Object
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 |