Class: ProgressBar::Components::Rate
- Inherits:
-
Object
- Object
- ProgressBar::Components::Rate
- Defined in:
- lib/ruby-progressbar/components/rate.rb
Instance Attribute Summary collapse
-
#progress ⇒ Object
Returns the value of attribute progress.
-
#rate_scale ⇒ Object
Returns the value of attribute rate_scale.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#stopped_at ⇒ Object
Returns the value of attribute stopped_at.
-
#timer ⇒ Object
Returns the value of attribute timer.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Rate
constructor
A new instance of Rate.
Constructor Details
#initialize(options = {}) ⇒ Rate
Returns a new instance of Rate.
10 11 12 13 14 15 16 |
# File 'lib/ruby-progressbar/components/rate.rb', line 10 def initialize( = {}) self.rate_scale = [:rate_scale] || lambda { |x| x } self.started_at = nil self.stopped_at = nil self.timer = [:timer] self.progress = [:progress] end |
Instance Attribute Details
#progress ⇒ Object
Returns the value of attribute progress.
4 5 6 |
# File 'lib/ruby-progressbar/components/rate.rb', line 4 def progress @progress end |
#rate_scale ⇒ Object
Returns the value of attribute rate_scale.
4 5 6 |
# File 'lib/ruby-progressbar/components/rate.rb', line 4 def rate_scale @rate_scale end |
#started_at ⇒ Object
Returns the value of attribute started_at.
4 5 6 |
# File 'lib/ruby-progressbar/components/rate.rb', line 4 def started_at @started_at end |
#stopped_at ⇒ Object
Returns the value of attribute stopped_at.
4 5 6 |
# File 'lib/ruby-progressbar/components/rate.rb', line 4 def stopped_at @stopped_at end |
#timer ⇒ Object
Returns the value of attribute timer.
4 5 6 |
# File 'lib/ruby-progressbar/components/rate.rb', line 4 def timer @timer end |