Sha256: 1f6b8bce8c4db2d1ca9cb46289994cb6dc511831e4f539abfa5fe5f5dbd5937f

Contents?: true

Size: 521 Bytes

Versions: 4

Compression:

Stored size: 521 Bytes

Contents

require 'sprockets'

module Machined
  # We need to add accessors for the Machined
  # environment and the Sprocket's config to the
  # index, so the Context has access.
  class Index < Sprockets::Index
    # A reference to the Machined environment which
    # created this instance.
    attr_reader :machined

    # A reference to the configuration.
    attr_reader :config

    #
    def initialize(environment)
      @machined = environment.machined
      @config   = environment.config

      super
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
machined-1.1.0 lib/machined/index.rb
machined-1.0.3 lib/machined/index.rb
machined-1.0.2 lib/machined/index.rb
machined-1.0.1 lib/machined/index.rb