Rake::Environment

Rakefile are evaluated in the Rake::Environment module space. Top level rake functions (e.g. :task, :file) are available in this environment.

Public Class Methods

load_rakefile(rakefile_path) click to toggle source

Load a rakefile from the given path. The Rakefile is loaded in an environment that includes the Rake DSL methods.

    # File lib/rake/environment.rb, line 14
14:       def load_rakefile(rakefile_path)
15:         rakefile = open(rakefile_path) { |f| f.read }
16:         load_string(rakefile, rakefile_path)
17:       end
load_string(code, file_name=nil) click to toggle source

Load a string of code in the Rake DSL environment. If the string comes from a file, include the file path so that proper line numbers references may be retained.

    # File lib/rake/environment.rb, line 22
22:       def load_string(code, file_name=nil)
23:         module_eval(code, file_name || "(eval)")
24:       end
run(&block) click to toggle source

Run a block of code in the Rake DSL environment.

    # File lib/rake/environment.rb, line 27
27:       def run(&block)
28:         module_eval(&block)
29:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.