# Does a required\_by method exist?

**URL:** <https://www.ruby-forum.com/t/does-a-required-by-method-exist/118646>\
**Category:** Ruby\
**Created:** [October 29, 2007, 7:17pm UTC](https://www.ruby-forum.com/t/does-a-required-by-method-exist/118646 "2007-10-29T19:17:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cc9497/32.png) [@jack](https://www.ruby-forum.com/u/jack)\
**Post date:** [October 29, 2007, 7:17pm UTC](https://www.ruby-forum.com/t/does-a-required-by-method-exist/118646/1 "2007-10-29T19:17:29Z")

</div>

Through some caller() and load path searching, I’ve found you can get  
the full path to the file requiring the one you’re currently in…Is  
there a built-in or easier way of doing this though?

thanks!

---

<div class="post-metadata">

**Author:** ![jack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cc9497/32.png) [@jack](https://www.ruby-forum.com/u/jack)\
**Post date:** [October 29, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/does-a-required-by-method-exist/118646/2 "2007-10-29T19:23:55Z")

</div>

On Oct 29, 2007, at 11:28 AM, Jack D. wrote:

> Through some caller() and load path searching, I’ve found you can get  
> the full path to the file requiring the one you’re currently in…Is  
> there a built-in or easier way of doing this though?

over ride Kernel#require and Kernel#load

a @ [http://codeforpeople.com/](http://codeforpeople.com/)
