Module: Falcon::Command::Paths
Overview
A helper for resolving wildcard configuration paths.
Instance Method Summary collapse
-
#configuration ⇒ Object
Build a configuration based on the resolved paths.
-
#resolved_paths(&block) ⇒ Object
Resolve a set of ‘@paths` that may contain wildcards, into a sorted, unique array.
Instance Method Details
#configuration ⇒ Object
Build a configuration based on the resolved paths.
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/falcon/command/paths.rb', line 38 def configuration configuration = Configuration.new self.resolved_paths.each do |path| path = File.(path) configuration.load_file(path) end return configuration end |
#resolved_paths(&block) ⇒ Object
Resolve a set of ‘@paths` that may contain wildcards, into a sorted, unique array.
31 32 33 34 35 |
# File 'lib/falcon/command/paths.rb', line 31 def resolved_paths(&block) @paths.collect do |path| Dir.glob(path) end.flatten.sort.uniq.each(&block) end |