Class: Conquer::Dzen::Graphics::ProgressBar
- Defined in:
- lib/conquer/dzen/graphics/progress_bar.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#orientation ⇒ Object
readonly
Returns the value of attribute orientation.
-
#progress ⇒ Object
readonly
Returns the value of attribute progress.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(progress, width, height, orientation = :horizontal) ⇒ ProgressBar
constructor
A new instance of ProgressBar.
Methods inherited from Graphic
Methods included from Positioning
#ignore_bg, #lock_x, #shift, #unlock_x
Constructor Details
#initialize(progress, width, height, orientation = :horizontal) ⇒ ProgressBar
Returns a new instance of ProgressBar.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/conquer/dzen/graphics/progress_bar.rb', line 10 def initialize(progress, width, height, orientation = :horizontal) super() @progress = progress @width = width @height = height @orientation = orientation @template = '^ib(1)^p(_LOCK_X)%s%s^p(_UNLOCK_X)^ib(0)' @template << shift(width, 0) @template_args = [outline, fill] end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
8 9 10 |
# File 'lib/conquer/dzen/graphics/progress_bar.rb', line 8 def height @height end |
#orientation ⇒ Object (readonly)
Returns the value of attribute orientation.
8 9 10 |
# File 'lib/conquer/dzen/graphics/progress_bar.rb', line 8 def orientation @orientation end |
#progress ⇒ Object (readonly)
Returns the value of attribute progress.
8 9 10 |
# File 'lib/conquer/dzen/graphics/progress_bar.rb', line 8 def progress @progress end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
8 9 10 |
# File 'lib/conquer/dzen/graphics/progress_bar.rb', line 8 def width @width end |