Class/Module Index [+]

Quicksearch

Pkg::Util

Utility methods used by the various rake tasks

Public Class Methods

boolean_value(var) click to toggle source
# File ext/packaging/lib/packaging/util.rb, line 14
def self.boolean_value(var)
  return TRUE if (var == TRUE || ( var.is_a?(String) && ( var.downcase == 'true' || var.downcase =~ /^y$|^yes$/ )))
  FALSE
end
in_project_root(&blk) click to toggle source
# File ext/packaging/lib/packaging/util.rb, line 19
def self.in_project_root(&blk)
  result = nil
  fail "Cannot execute in project root if Pkg::Config.project_root is not set" unless Pkg::Config.project_root

  Dir.chdir Pkg::Config.project_root do
    result = blk.call
  end
  result
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.