CrystalMonads::Try
Inherits Reference < Object
Class methods
try
Yields self. Nil overrides this method and doesn't yield.
This method is useful for dealing with nilable types, to safely
perform operations only when the value is not nil.
# First program argument in downcase, or nil
ARGV[0]?.try &.downcase
try(*args, &)
SourceInstance methods
failure?
Sourcesuccess?
Source