Class: Y2Network::Presenters::ConfigSummary

Inherits:
Object
  • Object
show all
Defined in:
src/lib/y2network/presenters/config_summary.rb

Overview

This class is responsible of creating text summaries for the given Y2Network::Config.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ ConfigSummary

Constructor

Parameters:



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

def initialize(config)
  @config = config
end

Instance Attribute Details

#configY2Network::Config (readonly)

Returns:



28
29
30
# File 'src/lib/y2network/presenters/config_summary.rb', line 28

def config
  @config
end

Instance Method Details

#textString

Network config RichText summary

Returns:

  • (String)


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

def text
  "#{interfaces_summary.text}#{dns_summary.text}#{routing_summary.text}"
end