Skip to content

Instantly share code, notes, and snippets.

@pat
Forked from benaskins/gist:76716
Created March 10, 2009 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pat/76749 to your computer and use it in GitHub Desktop.
Save pat/76749 to your computer and use it in GitHub Desktop.
- filtered_filenames(@items).each do |name|
%p do some stuff
def filtered_filenames(paths)
paths ||= []
paths.collect { |path|
path[/.+\/([^\/]+)\.haml$/, 1]
}.reject { |name|
name == "index" || name[/^hide\-/]
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment