Class: BarOfProgress
- Inherits:
-
Object
- Object
- BarOfProgress
- Defined in:
- lib/bar-of-progress.rb,
lib/bar_of_progress/version.rb
Defined Under Namespace
Classes: Output
Constant Summary collapse
- DEFAULTS =
{ :total => 100, :length => 10, :braces => %w{[ ]}, :complete_indicator => "●", :partial_indicator => "◍", :incomplete_indicator => "◌", :precision => 20 }
- VERSION =
"0.1.3"
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ BarOfProgress
constructor
A new instance of BarOfProgress.
- #progress(amount = 0) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ BarOfProgress
Returns a new instance of BarOfProgress.
18 19 20 21 22 23 24 |
# File 'lib/bar-of-progress.rb', line 18 def initialize( = {}) @options = DEFAULTS.merge() #massage data because eww. @options[:total] = to_d(@options[:total]) @options[:length] = @options[:length].to_i end |