Module: Kernel
Relationships & Source Files | |
Defined in: | lib/syntax_suggest/core_ext.rb |
Class Method Summary
- load(file, wrap = false) mod_func Internal use only
- require(file) mod_func Internal use only
- require_relative(file) mod_func Internal use only
- syntax_suggest_original_load mod_func Internal use only
- syntax_suggest_original_require mod_func Internal use only
- syntax_suggest_original_require_relative mod_func Internal use only
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. ("../#{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