Class: Timer::TimerNode

Inherits:
Object
  • Object
show all
Defined in:
lib/pg_graph/timer.rb

Direct Known Subclasses

TimerElement, TimerGroup

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#labelObject (readonly)

Returns the value of attribute label.



5
6
7
# File 'lib/pg_graph/timer.rb', line 5

def label
  @label
end

#timerObject (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_widthObject



11
# File 'lib/pg_graph/timer.rb', line 11

def label_width() label&.size || 0 end

#totalObject

Raises:

  • (NotThis)


14
# File 'lib/pg_graph/timer.rb', line 14

def total() raise NotThis end

#value_widthObject

Raises:

  • (NotThis)


12
# File 'lib/pg_graph/timer.rb', line 12

def value_width() raise NotThis end