Method: Library::Domain#load

Defined in:
lib/library/domain.rb

#load(pathname, options = {}) ⇒ true, false

Load file path. This is just like #require except that previously loaded files will be reloaded and standard extensions will not be automatically appended.

Parameters:

  • pathname (String)

    pathname of feature relative to library’s loadpath

Returns:

  • (true, false)

    if feature was successfully loaded



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/library/domain.rb', line 166

def load(pathname, options={}) #, &block)
  #options.merge!(block.call) if block

  if !Hash === options
    options = {}
    options[:wrap] = options 
  end

  options[:load]   = true
  options[:suffix] = false
  options[:local]  = false

  require(pathname, options)

  #if file = $LOAD_CACHE[path]
  #  return file.load
  #end

  #if file = Library.find(path, options)
  #  #file.library_activate
  #  $LOAD_CACHE[path] = file
  #  return file.load(options) #acquire(options)
  #end

  ##if options[:load]
  #  __load__(path, options[:wrap])
  ##else
  ##  __require__(path)
  ##end
end