Class: Wassup::PaneBuilder
- Inherits:
-
Object
- Object
- Wassup::PaneBuilder
- Defined in:
- lib/wassup/pane_builder.rb
Defined Under Namespace
Classes: ContentBuilder
Instance Attribute Summary collapse
-
#content_block ⇒ Object
Returns the value of attribute content_block.
-
#description ⇒ Object
Returns the value of attribute description.
-
#height ⇒ Object
Returns the value of attribute height.
-
#highlight ⇒ Object
Returns the value of attribute highlight.
-
#interval ⇒ Object
Returns the value of attribute interval.
-
#left ⇒ Object
Returns the value of attribute left.
-
#selection_blocks ⇒ Object
Returns the value of attribute selection_blocks.
-
#selection_blocks_description ⇒ Object
Returns the value of attribute selection_blocks_description.
-
#show_refresh ⇒ Object
Returns the value of attribute show_refresh.
-
#title ⇒ Object
Returns the value of attribute title.
-
#top ⇒ Object
Returns the value of attribute top.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
- #content(&block) ⇒ Object
-
#initialize ⇒ PaneBuilder
constructor
A new instance of PaneBuilder.
- #selection(input = 10, description = nil, &block) ⇒ Object
Constructor Details
#initialize ⇒ PaneBuilder
Returns a new instance of PaneBuilder.
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/wassup/pane_builder.rb', line 65 def initialize() @height = 1 @weight = 1 @top = 0 @left = 0 @highlight = false @interval = 60 * 5 @selection_blocks = {} @selection_blocks_description = {} end |
Instance Attribute Details
#content_block ⇒ Object
Returns the value of attribute content_block.
17 18 19 |
# File 'lib/wassup/pane_builder.rb', line 17 def content_block @content_block end |
#description ⇒ Object
Returns the value of attribute description.
12 13 14 |
# File 'lib/wassup/pane_builder.rb', line 12 def description @description end |
#height ⇒ Object
Returns the value of attribute height.
4 5 6 |
# File 'lib/wassup/pane_builder.rb', line 4 def height @height end |
#highlight ⇒ Object
Returns the value of attribute highlight.
9 10 11 |
# File 'lib/wassup/pane_builder.rb', line 9 def highlight @highlight end |
#interval ⇒ Object
Returns the value of attribute interval.
16 17 18 |
# File 'lib/wassup/pane_builder.rb', line 16 def interval @interval end |
#left ⇒ Object
Returns the value of attribute left.
7 8 9 |
# File 'lib/wassup/pane_builder.rb', line 7 def left @left end |
#selection_blocks ⇒ Object
Returns the value of attribute selection_blocks.
18 19 20 |
# File 'lib/wassup/pane_builder.rb', line 18 def selection_blocks @selection_blocks end |
#selection_blocks_description ⇒ Object
Returns the value of attribute selection_blocks_description.
19 20 21 |
# File 'lib/wassup/pane_builder.rb', line 19 def selection_blocks_description @selection_blocks_description end |
#show_refresh ⇒ Object
Returns the value of attribute show_refresh.
14 15 16 |
# File 'lib/wassup/pane_builder.rb', line 14 def show_refresh @show_refresh end |
#title ⇒ Object
Returns the value of attribute title.
11 12 13 |
# File 'lib/wassup/pane_builder.rb', line 11 def title @title end |
#top ⇒ Object
Returns the value of attribute top.
6 7 8 |
# File 'lib/wassup/pane_builder.rb', line 6 def top @top end |
#width ⇒ Object
Returns the value of attribute width.
5 6 7 |
# File 'lib/wassup/pane_builder.rb', line 5 def width @width end |
Instance Method Details
#content(&block) ⇒ Object
78 79 80 |
# File 'lib/wassup/pane_builder.rb', line 78 def content(&block) self.content_block = block end |
#selection(input = 10, description = nil, &block) ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/wassup/pane_builder.rb', line 81 def selection(input=10, description=nil, &block) if input.to_s.downcase == "enter" input = 10 end description_input = input if input.to_s == "10" description_input = "enter" end self.selection_blocks[input] = block self.selection_blocks_description[description_input] = description end |