Class: Timify::Event
- Inherits:
-
Object
- Object
- Timify::Event
- Defined in:
- lib/timify/span.rb
Overview
Instance Attribute Summary collapse
-
#inclusive ⇒ Float
readonly
Inclusive time of the segment.
- #label ⇒ String? readonly
- #location ⇒ String readonly
- #name ⇒ Object readonly
- #parent_label ⇒ String? readonly
-
#secs ⇒ Float
readonly
Self time of the segment.
- #share ⇒ Float? readonly
Instance Method Summary collapse
-
#initialize(name:, label:, location:, secs:, inclusive:, share: nil, parent_label: nil) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(name:, label:, location:, secs:, inclusive:, share: nil, parent_label: nil) ⇒ Event
Returns a new instance of Event.
61 62 63 64 65 66 67 68 69 |
# File 'lib/timify/span.rb', line 61 def initialize(name:, label:, location:, secs:, inclusive:, share: nil, parent_label: nil) @name = name @label = label @location = location @secs = secs @inclusive = inclusive @share = share @parent_label = parent_label end |
Instance Attribute Details
#inclusive ⇒ Float (readonly)
Returns inclusive time of the segment.
44 45 46 |
# File 'lib/timify/span.rb', line 44 def inclusive @inclusive end |
#label ⇒ String? (readonly)
35 36 37 |
# File 'lib/timify/span.rb', line 35 def label @label end |
#location ⇒ String (readonly)
38 39 40 |
# File 'lib/timify/span.rb', line 38 def location @location end |
#name ⇒ Object (readonly)
32 33 34 |
# File 'lib/timify/span.rb', line 32 def name @name end |
#parent_label ⇒ String? (readonly)
Returns label of the parent span; set for Timify#on_share
events, nil for Timify#on_slow.
52 53 54 |
# File 'lib/timify/span.rb', line 52 def parent_label @parent_label end |
#secs ⇒ Float (readonly)
Returns self time of the segment.
41 42 43 |
# File 'lib/timify/span.rb', line 41 def secs @secs end |
#share ⇒ Float? (readonly)
Returns child inclusive / parent elapsed so far; set for
Timify#on_share events, nil for Timify#on_slow.
48 49 50 |
# File 'lib/timify/span.rb', line 48 def share @share end |