重构eval(some_variable).is_a?(Proc)以不使用eval

我有一些看起来像旧的代码:

some_variable = "-> (params) { Company.search_by_params(params) }"
if eval(some_variable).is_a?(Proc)
...

Rubocop is complaining about the use of eval. Any ideas on how to remove the usage of eval?

I don't really understand Procs so any guidance on that would be appreciated.