-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
`title` and `steps` are used after all, I was wrong.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,22 +62,40 @@ def run | |
|
||
protected | ||
|
||
# Abstract method to write configuration | ||
# Write configuration. | ||
def write | ||
raise NotImplementedError, "Calling abstract method 'write'" | ||
end | ||
|
||
# Abstract method to provide information about client | ||
# @return [Hash] with keys | ||
# | ||
# * **`"steps"`** [Integer] --- | ||
# number of client steps, | ||
# * **`"when"`** [Array<Symbol>] --- | ||
# modes when client make sense; if missing, then run always | ||
# * **`"title"`** [String] --- | ||
# used to display to user what is happening. | ||
# Restrict in which modes it should run. | ||
# @return [Array<Symbol>, nil] | ||
# Valid values are `:autoinst`, `:autoupg`, `:installation`, | ||
# `:live_installation`, and `:update`. NOTE that these values | ||
# are NOT consistent with the names used in {Yast::ModeClass Mode}. | ||
# By default it returns `nil`, meaning to run always. | ||
def modes | ||
nil | ||
end | ||
|
||
# @return [Integer] the number of client steps. | ||
def steps | ||
1 | ||
end | ||
|
||
# @return [String] a title used to display to the user what is happening. | ||
def title | ||
raise NotImplementedError, "Calling abstract method 'title'" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jreidinger
Member
|
||
end | ||
|
||
private | ||
This comment has been minimized.
Sorry, something went wrong.
jreidinger
Member
|
||
|
||
# Adapt the metadata for inst_finish API | ||
def info | ||
raise NotImplementedError, "Calling abstract method 'info'" | ||
{ | ||
"when " => modes, | ||
"steps" => steps, | ||
"title" => title | ||
} | ||
end | ||
end | ||
end |
hmm, it is not consistent with inst_proposal which have backup when hash do not contain such key.