diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-09 03:29:13 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-09 03:29:13 -0800 |
commit | 6710f057f9033aec2ef62b961b9a2000a2d499e5 (patch) | |
tree | 028a6661590ad7dc06a3b0d01191f62c28d10753 /actionpack | |
parent | 636ae13a720926b12ff3dbd29959a5baf1af271a (diff) | |
parent | 759b03e74bc7f3821402edcf8119349f4416882c (diff) | |
download | rails-6710f057f9033aec2ef62b961b9a2000a2d499e5.tar.gz rails-6710f057f9033aec2ef62b961b9a2000a2d499e5.tar.bz2 rails-6710f057f9033aec2ef62b961b9a2000a2d499e5.zip |
Merge pull request #8151 from nashby/forwardable
delegate PathSet's enumerator methods
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/path_set.rb | 22 |
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 |