Sha256: 0126ca644b3ab225f20b3774019a33ae59a69b824c66ad816471a4708cff4e81

Contents?: true

Size: 441 Bytes

Versions: 1

Compression:

Stored size: 441 Bytes

Contents

module RockConfig
  class Scanner
    def initialize(configuration)
      @configuration = configuration
    end

    def find(file_name)
      @configuration.scanned_directories.each do |directory|
        @configuration.config_loaders.each do |loader|
          if config = loader.find_at(directory, file_name)
            return config
          end
        end
      end

      raise ConfigNotFound, "Config not found"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rock_config-0.0.1 lib/rock_config/scanner.rb