Class: Sprout::ProgressBarOutputStream
- Inherits:
-
Object
- Object
- Sprout::ProgressBarOutputStream
- Defined in:
- lib/sprout/progress_bar.rb
Instance Attribute Summary (collapse)
-
- (Object) title
readonly
Returns the value of attribute title.
Instance Method Summary (collapse)
- - (Object) flush
-
- (ProgressBarOutputStream) initialize(mgr)
constructor
A new instance of ProgressBarOutputStream.
- - (Object) print(msg)
- - (Object) to_s
Constructor Details
- (ProgressBarOutputStream) initialize(mgr)
A new instance of ProgressBarOutputStream
277 278 279 280 |
# File 'lib/sprout/progress_bar.rb', line 277 def initialize(mgr) @mgr = mgr @msg = '' end |
Instance Attribute Details
- (Object) title (readonly)
Returns the value of attribute title
275 276 277 |
# File 'lib/sprout/progress_bar.rb', line 275 def title @title end |
Instance Method Details
- (Object) flush
286 287 288 |
# File 'lib/sprout/progress_bar.rb', line 286 def flush @mgr.flush end |
- (Object) print(msg)
282 283 284 |
# File 'lib/sprout/progress_bar.rb', line 282 def print(msg) @msg = msg end |
- (Object) to_s
290 291 292 |
# File 'lib/sprout/progress_bar.rb', line 290 def to_s return @msg.clone.split("\n").join("").split("\r").join("") end |