Sha256: 910605d51cd2ae2b65ca3e74dec63d46d5f8d563e45ef044b7a9ae08fa62ed89

Contents?: true

Size: 563 Bytes

Versions: 8

Compression:

Stored size: 563 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

Dassets.init

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dassets-0.14.0 lib/dassets.rb
dassets-0.13.2 lib/dassets.rb
dassets-0.13.1 lib/dassets.rb
dassets-0.13.0 lib/dassets.rb
dassets-0.12.0 lib/dassets.rb
dassets-0.11.0 lib/dassets.rb
dassets-0.10.1 lib/dassets.rb
dassets-0.10.0 lib/dassets.rb