Skip to content

Commit

Permalink
CWM::Page: attr_readers widget_id, label, contents
Browse files Browse the repository at this point in the history
with mandatory constructor args
  • Loading branch information
mvidner committed May 19, 2017
1 parent 6475387 commit 9028c7d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions library/cwm/src/lib/cwm/page.rb
Expand Up @@ -12,9 +12,16 @@ class Page < CustomWidget
attr_accessor :initial

# @return [WidgetTerm] contents of the tab, can contain {AbstractWidget}s
abstract_method :contents
attr_reader :contents
# @return [String] label defines name of tab header
abstract_method :label
attr_reader :label
attr_reader :widget_id

def initialize(widget_id:, label:, contents:)
@widget_id = widget_id
@label = label
@contents = contents
end

# @return [WidgetHash]
def cwm_definition
Expand Down

0 comments on commit 9028c7d

Please sign in to comment.