class Monad::Maybe::Nothing
Public Instance Methods
bind(fn)
click to toggle source
# File lib/monad/maybe/nothing.rb, line 28 def bind(fn) self end
clone()
click to toggle source
# File lib/monad/maybe/nothing.rb, line 12 def clone self end
inspect()
click to toggle source
# File lib/monad/maybe/nothing.rb, line 16 def inspect 'nothing' end
just?()
click to toggle source
# File lib/monad/maybe/nothing.rb, line 32 def just? false end
method_missing(method, *args)
click to toggle source
# File lib/monad/maybe/nothing.rb, line 8 def method_missing(method, *args) self end
nil?()
click to toggle source
# File lib/monad/maybe/nothing.rb, line 20 def nil? true end
nothing?()
click to toggle source
# File lib/monad/maybe/nothing.rb, line 24 def nothing? true end
something?()
click to toggle source
# File lib/monad/maybe/nothing.rb, line 36 def something? false end
to_a()
click to toggle source
# File lib/monad/maybe/nothing.rb, line 53 def to_a [] end
to_json(*args)
click to toggle source
# File lib/monad/maybe/json.rb, line 15 def to_json(*args) 'null' end
to_s()
click to toggle source
# File lib/monad/maybe/nothing.rb, line 48 def to_s '' end
Also aliased as: to_str
unwrap(val=nil, &blk)
click to toggle source
# File lib/monad/maybe/nothing.rb, line 40 def unwrap(val=nil, &blk) val || blk.call end
value()
click to toggle source
# File lib/monad/maybe/nothing.rb, line 44 def value nil end