Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use abstract_method's for CWM::Page instead of ivars
to be consistent with the rest of CWM
- Loading branch information
Showing
1 changed file
with
5 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
require "abstract_method" | ||
require "cwm/custom_widget" | ||
require "yast" | ||
Yast.import "CWM" | ||
|
@@ -15,16 +16,11 @@ class Page < CustomWidget | |
# @return [Boolean] is this the initially selected tab | ||
attr_accessor :initial | ||
|
||
# @return [WidgetTerm] contents of the tab, can contain {AbstractWidget}s | ||
attr_reader :contents | ||
# @return [String] Label of {Tab} or of {PagerTreeItem} | ||
attr_reader :label | ||
# @return [WidgetTerm] contents of the page, can contain {AbstractWidget}s | ||
abstract_method :contents | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mvidner
Author
Member
|
||
|
||
def initialize(widget_id:, label:, contents:) | ||
@widget_id = widget_id | ||
@label = label | ||
@contents = contents | ||
end | ||
# @return [String] Label of {Tab} or of {PagerTreeItem} | ||
This comment has been minimized.
Sorry, something went wrong.
jreidinger
Member
|
||
abstract_method :label | ||
|
||
# @return [WidgetHash] | ||
def cwm_definition | ||
|
is it needed? I think CustomWidget itself define it as abstract_method.