Sha256: c3927126750e48109aea4d535d4a45929de58db84395ca1721c7b4f8d1f09cff

Contents?: true

Size: 361 Bytes

Versions: 1

Compression:

Stored size: 361 Bytes

Contents

# frozen_string_literal: true

if ActiveObject.configuration.autoload_kernel
  module Kernel

    def try_eval
      eval(self)
    rescue NameError, SyntaxError
      self
    end

    private

    # rubocop:disable Style/PerlBackrefs
    def caller_name
      caller(1..1).first =~ /`([^']*)'/ && $1
    end
    # rubocop:enable Style/PerlBackrefs

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_object-5.2.5 lib/active_object/kernel.rb