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.
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/falcon/command/paths.rb', line 21 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.
14 15 16 17 18 |
# File 'lib/falcon/command/paths.rb', line 14 def resolved_paths(&block) @paths.collect do |path| Dir.glob(path) end.flatten.sort.uniq.each(&block) end |