In Files

  • rake/scope.rb




Singleton null object for an empty scope.

Public Instance Methods

path() click to toggle source

Path for the scope.

               # File rake/scope.rb, line 5
def path
  map { |item| item.to_s }.reverse.join(":")
path_with_task_name(task_name) click to toggle source

Path for the scope + the named path.

               # File rake/scope.rb, line 10
def path_with_task_name(task_name)
trim(n) click to toggle source

Trim n innermost scope levels from the scope. In no case will this trim beyond the toplevel scope.

               # File rake/scope.rb, line 16
def trim(n)
  result = self
  while n > 0 && ! result.empty?
    result = result.tail
    n -= 1

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit

blog comments powered by Disqus