module Kind::Optional

Constants

NONE_INSTANCE

Public Instance Methods

[](value)
Alias for: new
new(value) click to toggle source
# File lib/kind/maybe.rb, line 16
def new(value)
  (::Exception === value || KIND.nil_or_undefined?(value) ? None : Some)
    .new(value)
end
Also aliased as: []