Created
November 9, 2009 08:35
-
-
Save hassox/229789 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
##### PATH MANAGEMENT | |
MyStack.push_paths :my_file_group, ["relative/path1", "relative/path2"], "**/*.rb" | |
MyStack.push_paths :my_file_group, "relative/path3" | |
MyStack.dirs_for :my_file_group #=> MyStack.roots * [relative/path1, relative/path2, relative/path3] | |
MyStack.dirs_and_glob_for :my_file_group #=> MyStack.roots * [relative/path1, **/*.rb] | |
#=> MyStack.roots * [relative/path2, **/*.rb] | |
#=> MyStack.roots * [relative/path3, nil] | |
MyStack.paths_for(:my_file_group) # list of all files that match all roots * relative_paths * globs | |
MyStack.unique_paths_for(:my_file_group) # like paths_for but will unique the files taking the last declared | |
MyStack.unique_paths_for(:my_file_group, :invert => true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment