Module: FdtMiddlemanTools

Defined in:
lib/fdt_middleman_tools.rb

Instance Method Summary collapse

Instance Method Details

#find_resource_by_path(path = '*', sortField = 'title') ⇒ Object



3
4
5
# 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.sortField <=> y.data.sortField}
end