Method: Library#activate

Defined in:
lib/library.rb

#activatetrue, false

Activate a library.

Returns:

  • (true, false)

    Has the library has been activated?



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/library.rb', line 132

def activate
  current = $LEDGER[name]

  if Library === current
    raise VersionConflict.new(self, current) if current != self
  else
    ## NOTE: we are only doing this for the sake of autoload
    ## which does not honor a customized require method.
    #if Library.autoload_hack?
    #  absolute_loadpath.each do |path|
    #    $LOAD_PATH.unshift(path)
    #  end
    #end
    $LEDGER[name] = self
  end

  # TODO: activate runtime requirements?
  #verify
end