microscope v1.0.0 Microscope.Validation
Provides functions for validating arguments or options to Microscope.
Summary
Functions
Checks if the base
option is valid
Checks if the callbacks
option is valid
Checks if the index
option is valid
Checks if the port
option is valid
Checks if the webroot
argument is valid
Functions
Checks if the base
option is valid.
Returns :ok
if base
is a string.
Raises ArgumentError
otherwise.
Checks if the callbacks
option is valid.
Returns :ok
if callbacks
is a list of atoms.
Raises ArgumentError
if the list contains non-atom values, or callbacks
is not a list.
Checks if the index
option is valid.
Returns :ok
if index
is a boolean value.
Raises ArgumentError
otherwise.
Checks if the port
option is valid.
Returns :ok
if port
is a positive integer less than 65536.
Raises ArgumentError
if port
is not an integer, or the value is out of
the acceptable range.
Checks if the webroot
argument is valid.
Returns :ok
if webroot
is the path to an existing directory.
Raises ArgumentError
if webroot
is not a directory, or webroot
is not
a string value.