Module: LHS::Record::Tracing::ClassMethods

Defined in:
lib/lhs/concerns/record/tracing.rb

Instance Method Summary collapse

Instance Method Details

#trace!(options = {}) ⇒ Object

Needs to be called directly from the first method (level) within LHS



12
13
14
15
16
17
18
19
20
21
# File 'lib/lhs/concerns/record/tracing.rb', line 12

def trace!(options = {})
  return options unless LHS.config.trace

  (options || {}).tap do |options|
    source = caller.detect do |source|
      !source.match?(%r{/lib/lhs})
    end
    options[:source] = source
  end
end