Module: Kernel

Defined in:
lib/roll/kernel.rb,
lib/roll/original.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.library(name, constraint = nil) ⇒ Object

Activate a library.



12
13
14
# File 'lib/roll/kernel.rb', line 12

def library(name, constraint=nil)
  Roll::Library.open(name, constraint)
end

.roll(name, constraint = nil) ⇒ Object

Activate a library.



19
20
21
# File 'lib/roll/kernel.rb', line 19

def roll(name, constraint=nil)
  Roll::Library.open(name, constraint)
end

Instance Method Details

#__LIBRARY__Object

In which library is the current file participating?



7
8
9
# File 'lib/roll/kernel.rb', line 7

def __LIBRARY__
  Roll::Library.load_stack.last
end

#acquire(file, opts = {}) ⇒ Object

Acquire script.



36
37
38
# File 'lib/roll/kernel.rb', line 36

def acquire(file, opts={})
  Roll::Library.acquire(file, opts)
end

#load(file, wrap = false) ⇒ Object Also known as: original_load

Load script.



31
32
33
# File 'lib/roll/kernel.rb', line 31

def load(file, wrap=false)
  Roll::Library.load(file, wrap)
end

#require(file) ⇒ Object Also known as: original_require

Require script.



26
27
28
# File 'lib/roll/kernel.rb', line 26

def require(file)
  Roll::Library.require(file)
end