Module: CutePrint::FindsForeignCaller Private

Extended by:
FindsForeignCaller
Included in:
FindsForeignCaller, Location, Printer
Defined in:
lib/cute_print/finds_foreign_caller.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#lib_pathObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



15
16
17
# File 'lib/cute_print/finds_foreign_caller.rb', line 15

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

#nearest_foreign_callerObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
11
12
13
# File 'lib/cute_print/finds_foreign_caller.rb', line 8

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