Sha256: bae58785ac6742f88701fe009524ac9b6eba60f38c8ab89e2097ae5ccd4f9489

Contents?: true

Size: 342 Bytes

Versions: 13

Compression:

Stored size: 342 Bytes

Contents

module CutePrint

  # @api private
  module FindsForeignCaller

    extend self

    def nearest_foreign_caller
      caller.find do |s|
        path = s.split(":").first
        !File.expand_path(path).include?(File.expand_path(lib_path))
      end
    end

    def lib_path
      File.join(File.dirname(__FILE__), '..')
    end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
cute_print-1.4.0 lib/cute_print/finds_foreign_caller.rb
cute_print-1.3.0 lib/cute_print/finds_foreign_caller.rb
cute_print-1.2.0 lib/cute_print/finds_foreign_caller.rb
cute_print-1.1.4 lib/cute_print/finds_foreign_caller.rb
cute_print-1.1.3 lib/cute_print/finds_foreign_caller.rb
cute_print-1.1.2 lib/cute_print/finds_foreign_caller.rb
cute_print-1.1.1 lib/cute_print/finds_foreign_caller.rb
cute_print-1.1.0 lib/cute_print/finds_foreign_caller.rb
cute_print-1.0.1 lib/cute_print/finds_foreign_caller.rb
cute_print-1.0.0 lib/cute_print/finds_foreign_caller.rb
cute_print-0.4.0 lib/cute_print/finds_foreign_caller.rb
cute_print-0.3.0 lib/cute_print/finds_foreign_caller.rb
cute_print-0.2.0 lib/cute_print/finds_foreign_caller.rb