Class: Gem::ShoesFace::ProgressReporter
- Inherits:
-
Object
- Object
- Gem::ShoesFace::ProgressReporter
- Defined in:
- lib/shoes/setup.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Instance Method Summary collapse
- #done ⇒ Object
-
#initialize(prog, status, size, initial_message, terminal_message = "complete") ⇒ ProgressReporter
constructor
A new instance of ProgressReporter.
- #updated(message) ⇒ Object
Constructor Details
#initialize(prog, status, size, initial_message, terminal_message = "complete") ⇒ ProgressReporter
Returns a new instance of ProgressReporter.
273 274 275 276 277 278 279 |
# File 'lib/shoes/setup.rb', line 273 def initialize(prog, status, size, , = "complete") @prog = prog (@status = status).replace @total = size @count = 0.0 end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
271 272 273 |
# File 'lib/shoes/setup.rb', line 271 def count @count end |
Instance Method Details
#done ⇒ Object
286 287 |
# File 'lib/shoes/setup.rb', line 286 def done end |
#updated(message) ⇒ Object
281 282 283 284 |
# File 'lib/shoes/setup.rb', line 281 def updated() @count += 1.0 @prog.fraction = (@count / @total.to_f) * 0.5 end |