module FdtMiddlemanTools
Public Instance Methods
find_resource_by_path(path = '*', sortField = 'title')
click to toggle source
# File lib/fdt_middleman_tools.rb, line 3 def find_resource_by_path (path = '*', sortField = 'title') sitemap.resources.select {|p| p.path.match(/#{path}/) }.sort{|x,y| x.data.instance_eval(sortField) <=> y.data.instance_eval(sortField)} end