Top Level Namespace
Defined Under Namespace
Modules: JustMaybe
Classes: Just, Nothing
Instance Method Summary
collapse
Instance Method Details
#Maybe(object) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/just_maybe.rb', line 5
def Maybe(object)
if object.nil?
Nothing.instance
else
Just.new(object)
end
end
|