sprockets
https://github.com/rails/sprockets
Ruby
Rack-based asset packaging system
Sprockets::UnloadedAsset#initialize
Internal: Initialize object for generating cache keys
uri - A String containing complete URI to a file including scheme
and full path such as
"file:///Path/app/assets/js/app.js?type=application/javascript"
env - The current "environment" that assets are being loaded into.
We need it so we know where the +root+ (directory where Sprockets
is being invoked). We also need it for the `file_digest` method,
since, for some strange reason, memoization is provided by
overriding methods such as `stat` in the `PathUtils` module.
Returns UnloadedAsset.Edit
git clone [email protected]:rails/sprockets.git
cd sprockets
open lib/sprockets/unloaded_asset.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Sprockets--UnloadedAsset-initialize-for-pr
# Commit to gitgit add lib/sprockets/unloaded_asset.rbgit commit -m "better docs for Sprockets::UnloadedAsset#initialize"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Sprockets--UnloadedAsset-initialize-for-pr
hub pull-request
# Celebrate!