Module: Padrino::Assets

Defined in:
lib/padrino-assets.rb

Class Method Summary collapse

Class Method Details

.environmentSprockets::Environment

Returns the configured Sprockets environment

Returns:

  • (Sprockets::Environment)

    Sprockets environment



32
33
34
# File 'lib/padrino-assets.rb', line 32

def environment
  @_environment
end

.load_pathsArray

Returns a list of paths Sprockets will use in order to find assets used by the project

Examples:

Padrino::Assets.load_paths << Padrino.root('vendor', '**', 'assets')

Returns:

  • (Array)

    List of assets paths



19
20
21
22
23
# File 'lib/padrino-assets.rb', line 19

def load_paths
  @_load_paths ||= ['app/assets/**', 'lib/assets/**'].map do |file|
    Dir[Padrino.root(file)]
  end.flatten
end

.manifestSprockets::Manifest

Returns a compiled manifest of our assets

Returns:

  • (Sprockets::Manifest)

    Sprockets manifest



43
44
45
# File 'lib/padrino-assets.rb', line 43

def manifest
  @_manifest
end