Class: Twb::DocDashboard

Inherits:
Object
  • Object
show all
Defined in:
lib/twb/docdashboard.rb,
lib/twb/docdashboardwebvert.rb

Constant Summary collapse

@@types =
Set.new( ['h', 'horiz', 'horizontal',
'v', 'vert',  'vertical'   ] )

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dashnodeObject (readonly)

, :panels, :autosize, :size


26
27
28
# File 'lib/twb/docdashboard.rb', line 26

def dashnode
  @dashnode
end

#titleObject

, :panels, :autosize, :size


26
27
28
# File 'lib/twb/docdashboard.rb', line 26

def title
  @title
end

#typeObject (readonly)

, :panels, :autosize, :size


26
27
28
# File 'lib/twb/docdashboard.rb', line 26

def type
  @type
end

#winnodeObject (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_sObject


49
50
51
# File 'lib/twb/docdashboard.rb', line 49

def to_s
  return @title + ' :: ' + @type
end