Sha256: 16bd29c675ba1807914c0e113b7558b625656aa734a1adefa905be7526cbc82b

Contents?: true

Size: 549 Bytes

Versions: 2

Compression:

Stored size: 549 Bytes

Contents

require 'dassets/version'
require 'dassets/asset_file'
require 'dassets/config'

module Dassets

  def self.config; @config ||= Config.new; end
  def self.configure(&block)
    block.call(self.config)
  end

  def self.init
    @asset_files ||= {}
  end

  def self.[](digest_path)
    @asset_files[digest_path] ||= AssetFile.new(digest_path)
  end

  def self.source_list
    SourceList.new(self.config.sources)
  end

  module SourceList
    def self.new(sources)
      sources.inject([]){ |list, source| list += source.files }
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dassets-0.9.0 lib/dassets.rb
dassets-0.8.0 lib/dassets.rb