Class: Y2Network::Presenters::ProposalSummary

Inherits:
Object
  • Object
show all
Includes:
Yast::I18n
Defined in:
src/lib/y2network/presenters/proposal_summary.rb

Overview

This class is responsible of creating text summaries for the given Y2Network::Config and mainly used by the installation proposal.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ ProposalSummary

Constructor

Parameters:



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

def initialize(config)
  textdomain "network"

  @config = config
end

Instance Attribute Details

#configY2Network::Config (readonly)

Returns:



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

def config
  @config
end

Instance Method Details

#one_line_textString

Basic information about interfaces configuration for the one line network proposal plain text summary.

Returns:

  • (String)


61
62
63
# File 'src/lib/y2network/presenters/proposal_summary.rb', line 61

def one_line_text
  interfaces_summary.one_line_text
end

#textString

Network proposal RichText format summary

Returns:

  • (String)


47
48
49
50
51
52
53
54
55
# File 'src/lib/y2network/presenters/proposal_summary.rb', line 47

def text
  output = "<ul>"
  output << list_item_for(_("Interfaces"), interfaces_summary.proposal_text)
  output << list_item_for(_("Hostname / DNS"), dns_summary.text)
  output << list_item_for(_("Routing"), routing_summary.text)
  output << "</ul>"

  output
end