From 60383162695466561817f55f98ffa711751fc37b Mon Sep 17 00:00:00 2001 From: Martin Vidner Date: Mon, 22 May 2017 15:23:45 +0200 Subject: [PATCH] Use abstract_method's for CWM::Page instead of ivars to be consistent with the rest of CWM --- library/cwm/src/lib/cwm/page.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/library/cwm/src/lib/cwm/page.rb b/library/cwm/src/lib/cwm/page.rb index 3f3455f55..c352a0c17 100644 --- a/library/cwm/src/lib/cwm/page.rb +++ b/library/cwm/src/lib/cwm/page.rb @@ -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 - def initialize(widget_id:, label:, contents:) - @widget_id = widget_id - @label = label - @contents = contents - end + # @return [String] Label of {Tab} or of {PagerTreeItem} + abstract_method :label # @return [WidgetHash] def cwm_definition