Class: Twb::DocDashboard
- Inherits:
-
Object
- Object
- Twb::DocDashboard
- Defined in:
- lib/twb/docdashboard.rb,
lib/twb/docdashboardwebvert.rb
Direct Known Subclasses
DocDashboardImageVert, DocDashboardWebHoriz, DocDashboardWebVert
Constant Summary collapse
- @@types =
Set.new( ['h', 'horiz', 'horizontal', 'v', 'vert', 'vertical' ] )
Instance Attribute Summary collapse
-
#dashnode ⇒ Object
readonly
, :panels, :autosize, :size.
-
#title ⇒ Object
, :panels, :autosize, :size.
-
#type ⇒ Object
readonly
, :panels, :autosize, :size.
-
#winnode ⇒ Object
readonly
, :panels, :autosize, :size.
Instance Method Summary collapse
-
#initialize(type) ⇒ DocDashboard
constructor
A new instance of DocDashboard.
- #size=(size) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(type) ⇒ DocDashboard
Returns a new instance of DocDashboard.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/twb/docdashboard.rb', line 38 def initialize type dashboard = if @@types.include?(type) then if type[0] == 'v' then DocDashboardVert.new else DocDashboardHoriz.new end else nil end return dashboard end |
Instance Attribute Details
#dashnode ⇒ Object (readonly)
, :panels, :autosize, :size
26 27 28 |
# File 'lib/twb/docdashboard.rb', line 26 def dashnode @dashnode end |
#title ⇒ Object
, :panels, :autosize, :size
26 27 28 |
# File 'lib/twb/docdashboard.rb', line 26 def title @title end |
#type ⇒ Object (readonly)
, :panels, :autosize, :size
26 27 28 |
# File 'lib/twb/docdashboard.rb', line 26 def type @type end |
#winnode ⇒ Object (readonly)
, :panels, :autosize, :size
26 27 28 |
# File 'lib/twb/docdashboard.rb', line 26 def winnode @winnode end |
Instance Method Details
#size=(size) ⇒ Object
34 35 36 |
# File 'lib/twb/docdashboard.rb', line 34 def size=(size) @size = size end |
#to_s ⇒ Object
49 50 51 |
# File 'lib/twb/docdashboard.rb', line 49 def to_s return @title + ' :: ' + @type end |