Module: Padrino::Assets

Defined in:
lib/padrino-assets.rb

Class Method Summary (collapse)

Class Method Details

+ (Sprockets::Environment) environment

Returns the configured Sprockets environment



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

def environment
  @_environment
end

+ (Array) load_paths

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')


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

+ (Sprockets::Manifest) manifest

Returns a compiled manifest of our assets



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

def manifest
  @_manifest
end