Top Level Namespace

Defined Under Namespace

Modules: URI, WebHDFS

Instance Method Summary collapse

Instance Method Details

#require_relative(relative_feature) ⇒ Object

Raises:

  • (LoadError)


4
5
6
7
8
9
# File 'lib/webhdfs/backport.rb', line 4

def require_relative(relative_feature)
  file = caller.first.split(/:\d/, 2).first
  raise LoadError, "require_relative is called in #{Regexp.last_match(1)}"\
                   if /\A\((.*)\)/ =~ file
  require File.expand_path(relative_feature, File.dirname(file))
end