module Falcon::Command::Paths

def configuration

Build a configuration based on the resolved paths.
def configuration
	configuration = Configuration.new
	
	self.resolved_paths do |path|
		path = File.expand_path(path)
		
		configuration.load_file(path)
	end
	
	return configuration
end

def resolved_paths(&block)

@returns [Array(String)]
Resolve a set of `@paths` that may contain wildcards, into a sorted, unique array.
def resolved_paths(&block)
	if @paths
		@paths.collect do |path|
			Dir.glob(path)
		end.flatten.sort.uniq.each(&block)
	end
end