Module: ProcessMetrics::Timer
- Defined in:
- lib/process_metrics/timer.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
72 73 74 |
# File 'lib/process_metrics/timer.rb', line 72 def self.included(base) base.extend ProcessMetrics::ClassMethods end |
Instance Method Details
#parent_uuid(options) ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/process_metrics/timer.rb', line 76 def parent_uuid() return unless if [:parent_uuid].respond_to?(:call) # It's a proc. parent_uuid is the return value [:parent_uuid].call(self) elsif [:parent_uuid].is_a?(Symbol) # It's a symbol. Call method on object and parent_uuid is its result. send([:parent_uuid]) else # It's something static. Just call #to_s [:parent_uuid].to_s end end |