module Lucky::ParamParser
Defined in:
lucky/param_parser.crConstant Summary
-
TIME_FORMATS =
[Time::Format::ISO_8601_DATE_TIME, Time::Format::RFC_2822, Time::Format::RFC_3339, Time::Format.new("%Y-%m-%dT%H:%M:%S", Time::Location::UTC), Time::Format.new("%Y-%m-%dT%H:%M", Time::Location::UTC), Time::Format::HTTP_DATE, Time::Format::ISO_8601_DATE, Time::Format::ISO_8601_TIME]
Class Method Summary
- .parse(param : String, klass : String.class) : String
- .parse(param : String, klass : Int16.class) : Int16 | Nil
- .parse(param : String, klass : Int32.class) : Int32 | Nil
- .parse(param : String, klass : Int64.class) : Int64 | Nil
- .parse(param : String, klass : Float64.class) : Float64 | Nil
- .parse(param : String, klass : Bool.class) : Bool | Nil
- .parse(param : String, klass : UUID.class) : UUID | Nil
- .parse(param : String, klass : Time.class) : Time | Nil
-
.parse(param : Array(String), klass : Array(T).class) : Array(T) | Nil forall T
Returns
Array(T)
if all params inparam
are properly cast
Class Method Detail
Returns Array(T)
if all params in param
are properly cast