123456789_123456789_123456789_123456789_123456789_

Module: Kernel

Relationships & Source Files
Defined in: lib/syntax_suggest/core_ext.rb

Class Method Summary

Class Method Details

load(file, wrap = false) (mod_func)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/syntax_suggest/core_ext.rb', line 66

def load(file, wrap = false)
  syntax_suggest_original_load(file)
rescue SyntaxError => e
  require "syntax_suggest/api" unless defined?(SyntaxSuggest::DEFAULT_VALUE)

  SyntaxSuggest.handle_error(e)
end

require(file) (mod_func)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/syntax_suggest/core_ext.rb', line 74

def require(file)
  syntax_suggest_original_require(file)
rescue SyntaxError => e
  require "syntax_suggest/api" unless defined?(SyntaxSuggest::DEFAULT_VALUE)

  SyntaxSuggest.handle_error(e)
end

require_relative(file) (mod_func)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/syntax_suggest/core_ext.rb', line 82

def require_relative(file)
  if Pathname.new(file).absolute?
    syntax_suggest_original_require file
  else
    relative_from = caller_locations(1..1).first
    relative_from_path = relative_from.absolute_path || relative_from.path
    syntax_suggest_original_require File.expand_path("../#{file}", relative_from_path)
  end
rescue SyntaxError => e
  require "syntax_suggest/api" unless defined?(SyntaxSuggest::DEFAULT_VALUE)

  SyntaxSuggest.handle_error(e)
end

syntax_suggest_original_load (mod_func)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/syntax_suggest/core_ext.rb', line 64

alias_method :syntax_suggest_original_load, :load

syntax_suggest_original_require (mod_func)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/syntax_suggest/core_ext.rb', line 62

alias_method :syntax_suggest_original_require, :require

syntax_suggest_original_require_relative (mod_func)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/syntax_suggest/core_ext.rb', line 63

alias_method :syntax_suggest_original_require_relative, :require_relative