Module: Rake
- Defined in:
- lib/rake-latex/vega.rb,
lib/rake-latex/latex.rb,
lib/rake-latex/figures.rb
Defined Under Namespace
Classes: DiaTask, FigureTask, GnuplotTask, GraffleTask, LatexTask, VegaTask
Constant Summary collapse
- VEGA_EXTS =
{ 'relaxng' => 'rnc', 'carp' => 'carp', 'latex' => 'tex' }
- @@rootdir =
Maintain the directory containing the current Rakefile.
nil
Class Method Summary collapse
-
.endfile ⇒ Object
Called at the end of a Rakefile that contains rules that needs to know the directory that the Rakefile is in.
-
.rootdir ⇒ Object
Returns the root directory of the current Rakefile.
-
.startfile(file) ⇒ Object
Called at the start of a Rakefile that contains rules that needs to know the directory that the Rakefile is in.
Class Method Details
.endfile ⇒ Object
Called at the end of a Rakefile that contains rules that needs to know the directory that the Rakefile is in. Removes the current Rakefile’s directory from the beginning of the @@rootdir list.
45 46 47 |
# File 'lib/rake-latex/latex.rb', line 45 def Rake.endfile() @@rootdir.shift end |
.rootdir ⇒ Object
Returns the root directory of the current Rakefile.
50 51 52 53 |
# File 'lib/rake-latex/latex.rb', line 50 def Rake.rootdir return "./" if @@rootdir.nil? or @@rootdir.empty? return @@rootdir[0] end |
.startfile(file) ⇒ Object
Called at the start of a Rakefile that contains rules that needs to know the directory that the Rakefile is in. Adds the current Rakefile’s directory to the beginning of the @@rootdir list. Should be called with __FILE__ as the parameter. This will take care of relative links to the file, allowing it to be required from different current directories.
37 38 39 40 |
# File 'lib/rake-latex/latex.rb', line 37 def Rake.startfile(file) @@rootdir = [] if @@rootdir.nil? @@rootdir.unshift(File.dirname(file)+'/') end |