sprockets

https://github.com/rails/sprockets

Ruby

Rack-based asset packaging system

Sprockets::Mime#read_file

Public: Read file on disk with MIME type specific encoding.

filename     - String path
content_type - String MIME type

Returns String file contents transcoded to UTF-8 or in its external
encoding.

Source | Google | Stack overflow

Edit

git clone [email protected]:rails/sprockets.git

cd sprockets

open lib/sprockets/mime.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Sprockets--Mime-read_file-for-pr


# Commit to git

git add lib/sprockets/mime.rbgit commit -m "better docs for Sprockets::Mime#read_file"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Sprockets--Mime-read_file-for-pr

hub pull-request


# Celebrate!