Skip to content

Commit

Permalink
Allow Middleman::Sitemap::ResourceListContainer to delegate each_with…
Browse files Browse the repository at this point in the history
…_index method (#2565)

For example, middleman-search 0.10.0 gem https://rubygems.org/gems/middleman-search/versions/0.10.0 uses this delegated method:
https://github.com/manastech/middleman-search/blob/ed9e5254bb554988c755fc40238d9e9f67b20abe/lib/middleman-search/search-index-resource.rb#L80

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
  • Loading branch information
tnir committed Aug 30, 2022
1 parent a2910b4 commit 5902a84
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ResourceListContainer
extend Forwardable
include Contracts

def_delegators :without_ignored, :each, :find, :select, :reject, :map
def_delegators :without_ignored, :each, :each_with_index, :find, :select, :reject, :map

Contract Maybe[ArrayOf[Resource]] => Any
def initialize(initial = nil)
Expand Down

0 comments on commit 5902a84

Please sign in to comment.