hassox (owner)

Revisions

gist: 229789 Download_button fork
public
Public Clone URL: git://gist.github.com/229789.git
Embed All Files: show embed
my_stack_path_example.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
##### 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)