aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorVasiliy Ermolovich <younash@gmail.com>2012-11-09 09:52:38 +0300
committerVasiliy Ermolovich <younash@gmail.com>2012-11-09 12:09:50 +0300
commit759b03e74bc7f3821402edcf8119349f4416882c (patch)
tree96d0b1be5d9ca7099b22b193e904e0d0c5c83907 /actionpack
parentc233b2f653601170f462a92a2406831f21f2c824 (diff)
downloadrails-759b03e74bc7f3821402edcf8119349f4416882c.tar.gz
rails-759b03e74bc7f3821402edcf8119349f4416882c.tar.bz2
rails-759b03e74bc7f3821402edcf8119349f4416882c.zip
delegate PathSet's enumerator methods
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/path_set.rb22
1 files changed, 2 insertions, 20 deletions
diff --git a/actionpack/lib/action_view/path_set.rb b/actionpack/lib/action_view/path_set.rb
index bbb1af8154..d9c76366f8 100644
--- a/actionpack/lib/action_view/path_set.rb
+++ b/actionpack/lib/action_view/path_set.rb
@@ -5,6 +5,8 @@ module ActionView #:nodoc:
attr_reader :paths
+ delegate :[], :include?, :pop, :size, :each, to: :paths
+
def initialize(paths = [])
@paths = typecast paths
end
@@ -14,30 +16,10 @@ module ActionView #:nodoc:
self
end
- def [](i)
- paths[i]
- end
-
def to_ary
paths.dup
end
- def include?(item)
- paths.include? item
- end
-
- def pop
- paths.pop
- end
-
- def size
- paths.size
- end
-
- def each(&block)
- paths.each(&block)
- end
-
def compact
PathSet.new paths.compact
end