ruby-analysis/delfos

View on GitHub
lib/delfos/method_trace/code_location/eval_in_caller.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require "binding_of_caller"

module Delfos
  module MethodTrace
    module CodeLocation
      module EvalInCaller
        def eval_in_caller(to_eval, offset)
          binding.of_caller(offset).eval(to_eval)
        end
      end
    end
  end
end