Class: TappingDevice::Trackers::AssociactionCallTracker
- Inherits:
-
TappingDevice
- Object
- TappingDevice
- TappingDevice::Trackers::AssociactionCallTracker
- Defined in:
- lib/tapping_device/trackers/association_call_tracker.rb
Constant Summary
Constants inherited from TappingDevice
CALLER_START_POINT, C_CALLER_START_POINT, VERSION
Instance Attribute Summary
Attributes inherited from TappingDevice
#calls, #options, #target, #trace_point
Instance Method Summary collapse
Methods inherited from TappingDevice
config, #create_child_device, #descendants, #initialize, #root_device, #set_block, #stop!, #stop_when, #track, #with
Methods included from Manageable
#delete_device, #devices, #reset!, #stop_all!, #suspend_new, #suspend_new!
Methods included from Output::Helpers
#and_output, #and_print, #and_write
Constructor Details
This class inherits a constructor from TappingDevice
Instance Method Details
#filter_condition_satisfied?(tp) ⇒ Boolean
8 9 10 11 12 13 14 |
# File 'lib/tapping_device/trackers/association_call_tracker.rb', line 8 def filter_condition_satisfied?(tp) return false unless is_from_target?(tp) model_class = target.class associations = model_class.reflections associations.keys.include?(tp.callee_id.to_s) end |
#validate_target! ⇒ Object
4 5 6 |
# File 'lib/tapping_device/trackers/association_call_tracker.rb', line 4 def validate_target! raise NotAnActiveRecordInstanceError.new(target) unless target.is_a?(ActiveRecord::Base) end |