Skip to content

Commit

Permalink
Add explanation of MimeType.for's handling of argument types
Browse files Browse the repository at this point in the history
  • Loading branch information
elebow committed Mar 18, 2022
1 parent 7f71ab9 commit 77e7157
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Marcel attempts to choose the most appropriate content type for a given file by looking at the binary data, the filename, and any declared type (perhaps passed as a request header):

The primary interface is the method `Marcel::MimeType.for`. If the first argument is a `Pathname`, Marcel will evaluate the contents of the specified file. Any other type is assumed to be an `IO`, and Marcel will evaluate its contents.

It's used like this:

```ruby
Expand Down

0 comments on commit 77e7157

Please sign in to comment.