Project

optiomist

0.0
No release in over a year
Optiomist represents an optional value. Be an optimist. The glass will never be half nil.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

optiomist

A simple implementation of an optional value pattern.

Let's be optimistic. The glass will never be half nil.

Usage

require 'optiomist'

result = Optiomist.some('value')
result.some? # => true
result.none? # => false
result.value # => 'value'

result = Optiomist.some(nil)
result.some? # => true
result.value # => nil

result = Optiomist.none
result.none? # => true
result.some? # => false

Running tests

./run_tests