Sha256: dda7fa34df3c966860acb98d36376bc0c66e3eed75e6df6e6ace459ea2171fa1

Contents?: true

Size: 647 Bytes

Versions: 6

Compression:

Stored size: 647 Bytes

Contents

module Assets
  class Environment
    # Static enviornment with precompiled assets
    class Static < self
      include Concord.new(:assets)

      # Return index
      #
      # @return [Hash]
      #
      # @api private
      #
      def index
        assets.each_with_object({}) do |asset, index|
          index[asset.name]=asset
        end
      end

      # Return asset
      #
      # @param [String] name
      #   name of asset
      #
      # @return [Asset]
      #   if found
      #
      # @return [nil]
      #   otherwise
      #
      # @api private
      #
      def get(name)
        index[name]
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mbj-assets-0.0.8 lib/assets/environment/static.rb
mbj-assets-0.0.7 lib/assets/environment/static.rb
mbj-assets-0.0.6 lib/assets/environment/static.rb
mbj-assets-0.0.5 lib/assets/environment/static.rb
mbj-assets-0.0.4 lib/assets/environment/static.rb
mbj-assets-0.0.3 lib/assets/environment/static.rb