Module: YAMLir::Base::ClassMethods
- Included in:
- YAMLir::Base
- Defined in:
- lib/yamlir/mode.rb
Instance Method Summary collapse
Instance Method Details
#generate(options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/yamlir/mode.rb', line 11 def generate = {} # TODO: Add options: # recursive: "true or false recursive" # folder_only: "get folders only" # without_extensions: "true of false for extensions" There'll be problem for the folder with the same name as the file without extension # store: true or false - store or not result in file @glob = normalize [:glob] || @glob @file = normalize [:file] || @file @path = normalize [:path] || @path store process Dir[*@glob] end |