Class: Gitenv::FilesMatcher
- Inherits:
-
Object
- Object
- Gitenv::FilesMatcher
- Defined in:
- lib/gitenv/files/matcher.rb
Instance Method Summary collapse
- #except(*args) ⇒ Object
- #files(path) ⇒ Object
-
#initialize(options = {}) ⇒ FilesMatcher
constructor
A new instance of FilesMatcher.
Constructor Details
#initialize(options = {}) ⇒ FilesMatcher
Returns a new instance of FilesMatcher.
6 7 8 9 |
# File 'lib/gitenv/files/matcher.rb', line 6 def initialize = {} @options = @ignores = [:ignores] ? [ [:ignores] ].flatten : [] end |
Instance Method Details
#except(*args) ⇒ Object
15 16 17 18 |
# File 'lib/gitenv/files/matcher.rb', line 15 def except *args @ignores.concat args self end |
#files(path) ⇒ Object
11 12 13 |
# File 'lib/gitenv/files/matcher.rb', line 11 def files path ignore Dir.entries(path) end |