module Middleman::Sitemap::Extensions::Proxies::ResourceInstanceMethods
def get_source_file
def get_source_file if proxy? proxy_resource = store.find_resource_by_path(proxied_to) unless proxy_resource raise "Path #{path} proxies to unknown file #{proxied_to}:#{store.resources.map(&:path)}" end if proxy_resource.proxy? raise "You can't proxy #{path} to #{proxied_to} which is itself a proxy." end proxy_resource.source_file end end
def proxied_to
-
(String)
-
def proxied_to @proxied_to end
def proxy?
-
(Boolean)
-
def proxy? !!@proxied_to end
def proxy_to(target)
-
(void)
-
Parameters:
-
target
(String
) --
def proxy_to(target) target = ::Middleman::Util.normalize_path(target) raise "You can't proxy #{path} to itself!" if target == path @proxied_to = target end
def template?
-
(Boolean)
-
def template? if proxy? store.find_resource_by_path(proxied_to).template? else super end end