aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rake/scope.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-04 12:31:31 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-04 12:31:31 +0000
commitc4ee0df8ba2cf7cc6aaa785c8df20a91b1719021 (patch)
tree06beca468cce4a75a3e9890d18aa001ef2c41e54 /lib/rake/scope.rb
parent8c0b2a286080609613b6b007e030ff7c7adaa23c (diff)
downloadruby-c4ee0df8ba2cf7cc6aaa785c8df20a91b1719021.tar.gz
* lib/rake/*: Gemify rake [fix GH-862][Feature #11025]
* test/rake/*: ditto. * tool/rbinstall.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rake/scope.rb')
-rw-r--r--lib/rake/scope.rb42
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/rake/scope.rb b/lib/rake/scope.rb
deleted file mode 100644
index dbefcea465..0000000000
--- a/lib/rake/scope.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-module Rake
- class Scope < LinkedList # :nodoc: all
-
- # Path for the scope.
- def path
- map { |item| item.to_s }.reverse.join(":")
- end
-
- # Path for the scope + the named path.
- def path_with_task_name(task_name)
- "#{path}:#{task_name}"
- end
-
- # Trim +n+ innermost scope levels from the scope. In no case will
- # this trim beyond the toplevel scope.
- def trim(n)
- result = self
- while n > 0 && ! result.empty?
- result = result.tail
- n -= 1
- end
- result
- end
-
- # Scope lists always end with an EmptyScope object. See Null
- # Object Pattern)
- class EmptyScope < EmptyLinkedList
- @parent = Scope
-
- def path
- ""
- end
-
- def path_with_task_name(task_name)
- task_name
- end
- end
-
- # Singleton null object for an empty scope.
- EMPTY = EmptyScope.new
- end
-end