Class: Timer::TimerElement
Instance Attribute Summary collapse
-
#time ⇒ Object
Returns the value of attribute time.
Attributes inherited from TimerNode
Instance Method Summary collapse
-
#initialize(timer, label, time) ⇒ TimerElement
constructor
A new instance of TimerElement.
- #total ⇒ Object
- #value ⇒ Object
- #value_width ⇒ Object
Methods inherited from TimerNode
Constructor Details
#initialize(timer, label, time) ⇒ TimerElement
Returns a new instance of TimerElement.
23 24 25 26 |
# File 'lib/pg_graph/timer.rb', line 23 def initialize(timer, label, time) super(timer, label) @time = time end |
Instance Attribute Details
#time ⇒ Object
Returns the value of attribute time.
21 22 23 |
# File 'lib/pg_graph/timer.rb', line 21 def time @time end |
Instance Method Details
#total ⇒ Object
31 |
# File 'lib/pg_graph/timer.rb', line 31 def total() @time end |
#value ⇒ Object
29 |
# File 'lib/pg_graph/timer.rb', line 29 def value() @value ||= format time end |
#value_width ⇒ Object
28 |
# File 'lib/pg_graph/timer.rb', line 28 def value_width() value.size end |