Method: RubyLibrary#initialize

Defined in:
lib/library/rubylib.rb

#initializeRubyLibrary

Setup Ruby library.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/library/rubylib.rb', line 20

def initialize(*) #(location, metadata={})
  #rubylibdir  = ::RbConfig::CONFIG['rubylibdir']
  #rubyarchdir = ::RbConfig::CONFIG['archdir']
  #rel_archdir  = rubyarchdir.sub(rubylibdir+'/', '')
  #
  #@location = rubylibdir
  #@loadpath = ['', rel_archpath]

  location = find_base_path(CONFIG.values_at('rubylibdir', 'sitelibdir', 'vendorlibdir'))
  loadpath = CONFIG.values_at(
    'rubylibdir',
    'archdir',
    'sitelibdir',
    'sitearchdir',
    'vendorlibdir',
    'vendorarchdir'
  ).map{ |d| d.sub(location + '/','') }

  @location = location
  @loadpath = loadpath
  @name     = 'ruby'
   = {}  # TODO: can we fillout Ruby's metadata some ?
end