From 82b9b151ffde44305d67744c0bfd9bb5505f6fbe Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Fri, 6 Nov 2009 17:21:39 -0800 Subject: Refactor plugins --- railties/lib/rails/paths.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'railties/lib/rails/paths.rb') diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index 0f24106353..b3d105d8c7 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -64,7 +64,7 @@ module Rails end class Path - include PathParent + include PathParent, Enumerable attr_reader :path attr_accessor :glob @@ -83,6 +83,10 @@ module Rails @root.all_paths << self end + def each + to_a.each { |p| yield p } + end + def push(path) @paths.push path end -- cgit v1.2.3