Class: TraceViz::TraceData::TracePoint::Base
- Includes:
- TraceViz::Traits::Identifiable
- Defined in:
- lib/trace_viz/trace_data/trace_point/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#line_number ⇒ Object
readonly
Returns the value of attribute line_number.
-
#memory_id ⇒ Object
readonly
Returns the value of attribute memory_id.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#trace_point ⇒ Object
readonly
Returns the value of attribute trace_point.
Attributes included from TraceViz::Traits::Identifiable
Attributes inherited from Node
Attributes included from TraceViz::Traits::TimeTrackable
Attributes included from TraceViz::Traits::DepthTrackable
Instance Method Summary collapse
- #duration ⇒ Object
-
#initialize(trace_point) ⇒ Base
constructor
A new instance of Base.
- #key ⇒ Object
- #to_h ⇒ Object
Methods included from TraceViz::Traits::Identifiable
Methods inherited from Node
Methods included from TraceViz::Traits::TimeTrackable
Methods included from TraceViz::Traits::DepthTrackable
Methods included from Helpers::ConfigHelper
#config, #fetch_general_config
Constructor Details
#initialize(trace_point) ⇒ Base
Returns a new instance of Base.
20 21 22 23 24 25 26 27 |
# File 'lib/trace_viz/trace_data/trace_point/base.rb', line 20 def initialize(trace_point) super() @trace_point = trace_point populate_attributes assign_memory_id assign_ids end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
12 13 14 |
# File 'lib/trace_viz/trace_data/trace_point/base.rb', line 12 def action @action end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
12 13 14 |
# File 'lib/trace_viz/trace_data/trace_point/base.rb', line 12 def event @event end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
12 13 14 |
# File 'lib/trace_viz/trace_data/trace_point/base.rb', line 12 def klass @klass end |
#line_number ⇒ Object (readonly)
Returns the value of attribute line_number.
12 13 14 |
# File 'lib/trace_viz/trace_data/trace_point/base.rb', line 12 def line_number @line_number end |
#memory_id ⇒ Object (readonly)
Returns the value of attribute memory_id.
12 13 14 |
# File 'lib/trace_viz/trace_data/trace_point/base.rb', line 12 def memory_id @memory_id end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
12 13 14 |
# File 'lib/trace_viz/trace_data/trace_point/base.rb', line 12 def path @path end |
#trace_point ⇒ Object (readonly)
Returns the value of attribute trace_point.
12 13 14 |
# File 'lib/trace_viz/trace_data/trace_point/base.rb', line 12 def trace_point @trace_point end |
Instance Method Details
#duration ⇒ Object
33 34 35 |
# File 'lib/trace_viz/trace_data/trace_point/base.rb', line 33 def duration 0 end |
#key ⇒ Object
29 30 31 |
# File 'lib/trace_viz/trace_data/trace_point/base.rb', line 29 def key event end |
#to_h ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'lib/trace_viz/trace_data/trace_point/base.rb', line 37 def to_h super.merge( { id: id, action_id: action_id, memory_id: memory_id, }, ) end |