Class: RWDProgressBar
Instance Method Summary collapse
-
#initialize(refresh, progress) ⇒ RWDProgressBar
constructor
A new instance of RWDProgressBar.
Methods inherited from RWDWindow
Constructor Details
#initialize(refresh, progress) ⇒ RWDProgressBar
Returns a new instance of RWDProgressBar.
747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 |
# File 'lib/rwd/rwd.rb', line 747 def initialize(refresh, progress) s = "" s << "<window title='RWD Progress' nobackbuttons noclosebutton refresh='#{refresh}'>" if progress.length == 1 progress.each do |, value| s << "<p>#{}</p><progressbar value='#{value}'/><p>#{(100*value).to_i}%%</p>" end else s << "<table>" progress.each do |, value| s << "<row><p align='left'>#{}</p><progressbar value='#{value}'/><p align='right'>#{(100*value).to_i}%%</p></row>" end s << "</table>" end s << "<cancel/>" s << "</window>" super(s) end |