Sha256: 0aec62c705112191f511e4ae3a12e16950c2433c790771dc34c5238d3ac33a36

Contents?: true

Size: 322 Bytes

Versions: 6

Compression:

Stored size: 322 Bytes

Contents

class EngineAssets::PublicLocator
  class << self
    def paths
      @paths ||= []
    end

    def locate(file_path)
      full_paths = paths.map { |base_path| File.join(base_path, file_path) }
      full_paths.each do |full_path|
        return full_path if File.exist?(full_path)
      end
      nil
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
engine-assets-0.3.3 lib/engine_assets/public_locator.rb
engine-assets-0.3.2 lib/engine_assets/public_locator.rb
engine-assets-0.3.1 lib/engine_assets/public_locator.rb
engine-assets-0.3.0 lib/engine_assets/public_locator.rb
engine-assets-0.2.1 lib/engine_assets/public_locator.rb
engine-assets-0.2.0 lib/engine_assets/public_locator.rb