Class: Yast::LogGroupResult
- Inherits:
-
Object
- Object
- Yast::LogGroupResult
- Defined in:
- src/ruby/yast/y2logger.rb
Overview
Stores the log group result data, used in Y2Logger#group.
Instance Attribute Summary collapse
-
#error_values ⇒ Array
List of error values (result values that will make success false).
-
#result ⇒ Object
Result of the block.
- #success ⇒ Object writeonly
-
#summary ⇒ String?
Result of the step as a textual description.
Instance Method Summary collapse
-
#initialize ⇒ LogGroupResult
constructor
A new instance of LogGroupResult.
-
#success? ⇒ Boolean
was the execution of the block successful?.
Constructor Details
#initialize ⇒ LogGroupResult
Returns a new instance of LogGroupResult.
35 36 37 38 39 |
# File 'src/ruby/yast/y2logger.rb', line 35 def initialize # these return values are considered failures by default, # can be overridden by modifying the `error_values` list @error_values = [:abort, :cancel, false] end |
Instance Attribute Details
#error_values ⇒ Array
Returns list of error values (result values that will make success false).
23 24 25 |
# File 'src/ruby/yast/y2logger.rb', line 23 def error_values @error_values end |
#result ⇒ Object
Returns result of the block.
16 17 18 |
# File 'src/ruby/yast/y2logger.rb', line 16 def result @result end |
#success=(value) ⇒ Object
20 21 22 |
# File 'src/ruby/yast/y2logger.rb', line 20 def success=(value) @success = value end |
#summary ⇒ String?
Returns result of the step as a textual description.
13 14 15 |
# File 'src/ruby/yast/y2logger.rb', line 13 def summary @summary end |
Instance Method Details
#success? ⇒ Boolean
was the execution of the block successful?
27 28 29 30 31 32 33 |
# File 'src/ruby/yast/y2logger.rb', line 27 def success? if success.nil? !error_values.include?(result) else success end end |