Class: Installation::AutoinstIssues::List
- Inherits:
-
Object
- Object
- Installation::AutoinstIssues::List
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- library/general/src/lib/installation/autoinst_issues/list.rb
Overview
List of AutoYaST problems
Instance Method Summary collapse
-
#add(klass, *extra_args) ⇒ Array<Issue>
Add a problem to the list.
-
#fatal? ⇒ Boolean
Determine whether any of the problem on the list is fatal.
-
#initialize ⇒ List
constructor
Constructor.
-
#to_a ⇒ Array<Issue>
Returns an array containing registered problems.
Constructor Details
#initialize ⇒ List
Constructor
50 51 52 |
# File 'library/general/src/lib/installation/autoinst_issues/list.rb', line 50 def initialize @items = [] end |
Instance Method Details
#add(klass, *extra_args) ⇒ Array<Issue>
Add a problem to the list
The type of the problem is class of the regarding issue
e.g.: MissingRoot
If a given type of problem requires some additional arguments, they should be added when calling this method. See the next example.
72 73 74 |
# File 'library/general/src/lib/installation/autoinst_issues/list.rb', line 72 def add(klass, *extra_args) self << klass.new(*extra_args) end |
#fatal? ⇒ Boolean
Determine whether any of the problem on the list is fatal
79 80 81 |
# File 'library/general/src/lib/installation/autoinst_issues/list.rb', line 79 def fatal? any?(&:fatal?) end |
#to_a ⇒ Array<Issue>
Returns an array containing registered problems
86 87 88 |
# File 'library/general/src/lib/installation/autoinst_issues/list.rb', line 86 def to_a @items end |