Inspired by Rails' MapWithIndifferentAccess, allows the substitution of symbols for strings as map keys.
Inspired by Rails' MapWithIndifferentAccess, allows the substitution of symbols for strings as map keys. Note that the map is still keyed with strings; symbols are stored in permgen, so symbol keys maps should not be used for maps with arbitrary keys. There is no performance gain using symbols. It is here to make our Rubyists feel more at home.
A utility to help with mime type detection for a given file path or url
MapWithIndifferentAccess
Nice trick from Miles Sabin using ambiguity in implicit resolution to disallow Nothing
Extractor object, useful for handling empty form parameter submissions:
Extractor object, useful for handling empty form parameter submissions:
params.get("foo") match { case NotEmpty(value) => processValue(value) case _ => message("foo is required") }
Executes a block with a closeable resource, and closes it after the block runs
Executes a block with a closeable resource, and closes it after the block runs
the return type of the block
the closeable resource type
the closeable resource
the block