Class: Gem::ShoesFace::ProgressReporter
- Inherits:
-
Object
- Object
- Gem::ShoesFace::ProgressReporter
- Defined in:
- lib/shoes/setup.rb
Instance Attribute Summary (collapse)
-
- (Object) count
readonly
Returns the value of attribute count.
Instance Method Summary (collapse)
- - (Object) done
-
- (ProgressReporter) initialize(prog, status, size, initial_message, terminal_message = "complete")
constructor
A new instance of ProgressReporter.
- - (Object) updated(message)
Constructor Details
- (ProgressReporter) initialize(prog, status, size, initial_message, terminal_message = "complete")
A new instance of ProgressReporter
291 292 293 294 295 296 297 |
# File 'lib/shoes/setup.rb', line 291 def initialize(prog, status, size, , = "complete") @prog = prog (@status = status).replace @total = size @count = 0.0 end |
Instance Attribute Details
- (Object) count (readonly)
Returns the value of attribute count
289 290 291 |
# File 'lib/shoes/setup.rb', line 289 def count @count end |
Instance Method Details
- (Object) done
304 305 |
# File 'lib/shoes/setup.rb', line 304 def done end |
- (Object) updated(message)
299 300 301 302 |
# File 'lib/shoes/setup.rb', line 299 def updated() @count += 1.0 @prog.fraction = (@count / @total.to_f) * 0.5 end |