Class: Timer::TimerNode
- Inherits:
-
Object
- Object
- Timer::TimerNode
- Defined in:
- lib/pg_graph/timer.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#timer ⇒ Object
readonly
Returns the value of attribute timer.
Instance Method Summary collapse
-
#initialize(timer, label) ⇒ TimerNode
constructor
A new instance of TimerNode.
- #label_width ⇒ Object
- #total ⇒ Object
- #value_width ⇒ Object
Constructor Details
#initialize(timer, label) ⇒ TimerNode
Returns a new instance of TimerNode.
7 8 9 |
# File 'lib/pg_graph/timer.rb', line 7 def initialize(timer, label) @timer, @label = timer, label end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
5 6 7 |
# File 'lib/pg_graph/timer.rb', line 5 def label @label end |
#timer ⇒ Object (readonly)
Returns the value of attribute timer.
4 5 6 |
# File 'lib/pg_graph/timer.rb', line 4 def timer @timer end |
Instance Method Details
#label_width ⇒ Object
11 |
# File 'lib/pg_graph/timer.rb', line 11 def label_width() label&.size || 0 end |
#total ⇒ Object
14 |
# File 'lib/pg_graph/timer.rb', line 14 def total() raise NotThis end |
#value_width ⇒ Object
12 |
# File 'lib/pg_graph/timer.rb', line 12 def value_width() raise NotThis end |