Class Sprockets::AssetAttributes
In: lib/sprockets/asset_attributes.rb
Parent: Object

`AssetAttributes` is a wrapper similar to `Pathname` that provides some helper accessors.

These methods should be considered internalish.

Methods

Attributes

environment  [R] 
pathname  [R] 

Public Class methods

Public Instance methods

Returns the content type for the pathname. Falls back to `application/octet-stream`.

Returns an `Array` of engine extensions.

    "foo.js.coffee.erb"
    # => [".coffee", ".erb"]

Returns engine classes.

Returns `Array` of extension `String`s.

    "foo.js.coffee"
    # => [".js", ".coffee"]

Returns the format extension.

    "foo.js.coffee"
    # => ".js"

Reverse guess logical path for fully expanded path.

This has some known issues. For an example if a file is shaddowed in the path, but is required relatively, its logical path will be incorrect.

Returns all processors to run on the path.

Returns paths search the load path for.

[Validate]