Class: TraceViz::TraceData::TracePoint::MethodCall
- Includes:
- Helpers::TracePoint::ParamHelper
- Defined in:
- lib/trace_viz/trace_data/trace_point/method_call.rb
Constant Summary
Constants included from Helpers::TracePoint::ParamHelper
Helpers::TracePoint::ParamHelper::IGNORED_METHODS, Helpers::TracePoint::ParamHelper::IGNORED_VARIABLES
Instance Attribute Summary collapse
-
#method_return ⇒ Object
readonly
Returns the value of attribute method_return.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Attributes inherited from Base
#action, #event, #klass, #line_number, #memory_id, #path, #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) ⇒ MethodCall
constructor
A new instance of MethodCall.
- #link(method_return) ⇒ Object
- #result ⇒ Object
- #to_h ⇒ Object
Methods included from Helpers::TracePoint::ParamHelper
#extract_parameters_from_signature, #extract_params, #fetch_method_via_instance_method, #placeholder_parameter?, #safe_eval, #safe_local_variable_get, #should_ignore_method?, #should_ignore_parameter?, #should_ignore_variable?, #splat_parameter?
Methods inherited from Base
Methods included from TraceViz::Traits::Identifiable
Methods inherited from Node
Methods inherited from Base
#action, #event, #key, #klass, #line_number, #path
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) ⇒ MethodCall
Returns a new instance of MethodCall.
14 15 16 17 18 |
# File 'lib/trace_viz/trace_data/trace_point/method_call.rb', line 14 def initialize(trace_point) super(trace_point) populate_params end |
Instance Attribute Details
#method_return ⇒ Object (readonly)
Returns the value of attribute method_return.
12 13 14 |
# File 'lib/trace_viz/trace_data/trace_point/method_call.rb', line 12 def method_return @method_return end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
12 13 14 |
# File 'lib/trace_viz/trace_data/trace_point/method_call.rb', line 12 def params @params end |
Instance Method Details
#duration ⇒ Object
28 29 30 31 32 |
# File 'lib/trace_viz/trace_data/trace_point/method_call.rb', line 28 def duration return 0 unless method_return method_return. - end |
#link(method_return) ⇒ Object
24 25 26 |
# File 'lib/trace_viz/trace_data/trace_point/method_call.rb', line 24 def link(method_return) @method_return = method_return end |
#result ⇒ Object
20 21 22 |
# File 'lib/trace_viz/trace_data/trace_point/method_call.rb', line 20 def result method_return&.result end |
#to_h ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/trace_viz/trace_data/trace_point/method_call.rb', line 34 def to_h super.merge( { params: params, method_return_id: method_return&.id, }, ) end |