Created
May 12, 2009 14:08
-
-
Save lachlanhardy/110503 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assume we're passing the values from the file below as arguments to the following: | |
# WTF is name always nil? | |
def filtered_filenames(paths) | |
paths ||= [] | |
paths.collect { |path| | |
path[/.+\/(.+)$/, 1] | |
}.reject { |name| | |
name == "index.haml" | |
} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a Dir.glob of a folder. | |
"views/articles/74-twitter-adds-a-breakdown" | |
"views/articles/action-reaction" | |
"views/articles/ardent-about-arduino" | |
"views/articles/bitter-twitches" | |
"views/articles/gitjour-the-quickening" | |
"views/articles/index.haml" | |
"views/articles/internet-gurus" | |
"views/articles/joining-the-conversation" | |
"views/articles/local-government-open-web" | |
"views/articles/make-the-leap" | |
"views/articles/meraki-madness" | |
"views/articles/meshing-with-meraki" | |
"views/articles/nonscary-way-of-learning-openid" | |
"views/articles/phishing-fools" | |
"views/articles/pimping-your-github-commits-js" | |
"views/articles/podcast-for-your-pleasure" | |
"views/articles/remix-australia-rocked" | |
"views/articles/share-the-love" | |
"views/articles/sun-said-what" | |
"views/articles/test" | |
"views/articles/twitterific-troll-filter" | |
"views/articles/x-ua-compatible-past-thoughts-of-children" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment