module Falcon::Command::Paths

A helper for resolving wildcard configuration paths.

Public Instance Methods

configuration() click to toggle source

Build a configuration based on the resolved paths.

# File lib/falcon/command/paths.rb, line 38
def configuration
        configuration = Configuration.new
        
        self.resolved_paths.each do |path|
                path = File.expand_path(path)
                
                configuration.load_file(path)
        end
        
        return configuration
end
resolved_paths(&block) click to toggle source

Resolve a set of `@paths` that may contain wildcards, into a sorted, unique array. @returns [Array(String)]

# 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