Class: Sprout::ProgressBarOutputStream

Inherits:
Object
  • Object
show all
Defined in:
sprout/lib/sprout/progress_bar.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (ProgressBarOutputStream) initialize(mgr)

A new instance of ProgressBarOutputStream



277
278
279
280
# File 'sprout/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 'sprout/lib/sprout/progress_bar.rb', line 275

def title
  @title
end

Instance Method Details

- (Object) flush



286
287
288
# File 'sprout/lib/sprout/progress_bar.rb', line 286

def flush
  @mgr.flush
end


282
283
284
# File 'sprout/lib/sprout/progress_bar.rb', line 282

def print(msg)
  @msg = msg
end

- (Object) to_s



290
291
292
# File 'sprout/lib/sprout/progress_bar.rb', line 290

def to_s
  return @msg.clone.split("\n").join("").split("\r").join("")
end