CSSEx.Unit.new_unit
You're seeing just the function
new_unit
, go back to CSSEx.Unit module for more information.
Specs
Accepts a String.t and Generates a %CSSEx.Unit{}
with an appropriate unit set if it matches any of the predefined units, otherwise a struct with unit set to nil when there's no unit, or an error if there's a unit but isn't a valid one.
If the argument can't be parsed as a float it returns an :error
tuple