-
Notifications
You must be signed in to change notification settings - Fork 438
Open
Description
I have a subclass of MimeMagic that I use that has a handful of useful methods:
.binary?will sample an input to determine if it's binary (or text).default_typewill returnapplication/octet-streamif the input is binary,text/plainotherwise#parentswill return the list of a type's immediate parents#lineagewill return a type's full list of ancestors
I also make a cursory affordance for type parameters in the constructor and inspect methods.
I'm filing this issue rather than coming in hot with a PR because I also change the behaviour of .by_magic and .all_by_magic, such that they will always return a value (the value of .default_type); I figured that merited some discussion. I'm happy to do the patch that addresses this and another issue.
Metadata
Metadata
Assignees
Labels
No labels