module Popcorn

Overview

Popcorn is easy and safe from one type to another tool.

Popcorn proviedes a handful of to_xxx/to_xxx? methods and xxx is full type name, This is distinguish between built-in methods in Crystal.

Also these methods had been inject to Crystal literals, you can call it directly, such like:

Popcorn.to_int("123abc")                # => 123
Popcorn.to_bool("No")                   # => false
Popcorn.to_time("2018-01-20T01:20:33Z") # => Time.local(2018, 1, 20, 1, 20, 33, location: Time::Location::UTC)

More methods to review Popcorn::Cast.

Extended Modules

Defined in:

popcorn.cr
popcorn/cast.cr
popcorn/injection.cr
popcorn/version.cr

Constant Summary

VERSION = "0.3.0"