Module: ProcessMetrics::Timer
- Defined in:
- lib/process_metrics/timer.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
52 53 54 |
# File 'lib/process_metrics/timer.rb', line 52 def self.included(base) base.extend ProcessMetrics::ClassMethods end |
Instance Method Details
#parent_uuid(options) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/process_metrics/timer.rb', line 56 def parent_uuid() return unless if [:parent_uuid].respond_to?(:call) # It's a proc. parent_uuid is the return value [:parent_uuid].call 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 |