lib/wassup/pane_builder.rb in wassup-0.3.2 vs lib/wassup/pane_builder.rb in wassup-0.4.0

- old
+ new

@@ -1,7 +1,13 @@ module Wassup + module AlertLevel + HIGH = "high" + MEDIUM = "medium" + LOW = "low" + end + class PaneBuilder attr_accessor :height attr_accessor :width attr_accessor :top attr_accessor :left @@ -9,17 +15,21 @@ attr_accessor :highlight attr_accessor :title attr_accessor :description + attr_accessor :alert_level + attr_accessor :show_refresh attr_accessor :interval attr_accessor :content_block attr_accessor :selection_blocks attr_accessor :selection_blocks_description + attr_accessor :type + class ContentBuilder attr_accessor :contents def initialize(contents) @contents = contents @@ -60,20 +70,24 @@ content.add_row(display, object) end end - def initialize() + def initialize @height = 1 @weight = 1 @top = 0 @left = 0 @highlight = false @interval = 60 * 5 @selection_blocks = {} @selection_blocks_description = {} + end + + def type=(type) + type.configure(self) end def content(&block) self.content_block = block end