Class: Rake::Scope

Do not use. This class is for internal use only.
Relationships & Source Files
Namespace Children
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, LinkedList
Instance Chain:
self, LinkedList, Enumerable
Inherits: Rake::LinkedList
Defined in: lib/rake/scope.rb

Constant Summary

LinkedList - Inherited


Class Method Summary

LinkedList - Inherited


Cons a new head onto the tail list.


The standard empty list class for the given LinkedList class.


Make a list out of the given arguments.


Instance Attribute Summary

LinkedList - Inherited


Is the list empty? .make guards against a list being empty making any instantiated LinkedList object not empty by default You should consider overriding this method if you implement your own .make method.

#head, #tail

Instance Method Summary

LinkedList - Inherited


Lists are structurally equivalent.


Polymorphically add a new element to the head of a list.


For each item in the list.


Same as to_s, but with inspected items.


Convert to string: LL(item, item…).

Constructor Details

This class inherits a constructor from Rake::LinkedList

Instance Method Details


Path for the scope.

[ GitHub ]

# File 'lib/rake/scope.rb', line 6

def path


Path for the scope + the named path.

[ GitHub ]

# File 'lib/rake/scope.rb', line 11

def path_with_task_name(task_name)


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

[ GitHub ]

# File 'lib/rake/scope.rb', line 17

def trim(n)
  result = self
  while n > 0 && !result.empty?
    result = result.tail
    n -= 1