Class: Object

### Home Classes Methods

### In Files

- lib/require_relative.rb

### Parent

BasicObject

### Methods

- #require_relative

### Class/Module Index

Quicksearch

- Kernel
- Object
- RequireRelative

No matching classes.

# Object

### Public Instance Methods

require_relative(suffix) click to toggle source

    # File lib/require_relative.rb, line 53
    def require_relative(suffix)
      file = caller.first.split(/:\d/,2).first
      if /\A\((.*)\)/ =~ file # eval, etc.
        raise LoadError, "require_relative is called in #{$1}"
      end
      require File.join(File.dirname(file), suffix)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.