From b48a7675956fe2b1495f0a4ee5ed5ed5816a0a65 Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Sat, 26 Apr 2014 12:56:50 -0700 Subject: [PATCH] Use alias_method instead of defining an alias method for current_page --- middleman-core/lib/middleman-core/sitemap.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/middleman-core/lib/middleman-core/sitemap.rb b/middleman-core/lib/middleman-core/sitemap.rb index 3a66cebb..c320369c 100644 --- a/middleman-core/lib/middleman-core/sitemap.rb +++ b/middleman-core/lib/middleman-core/sitemap.rb @@ -37,18 +37,13 @@ module Middleman @locs[:current_path] end - # Get the resource object for the current path - # @return [Middleman::Sitemap::Resource] - def current_page - current_resource - end - # Get the resource object for the current path # @return [Middleman::Sitemap::Resource] def current_resource return nil unless current_path sitemap.find_resource_by_destination_path(current_path) end + alias_method :current_page, :current_resource end end end