class OrElse::NothingClass
Public Instance Methods
all?()
click to toggle source
# File lib/or_else/nothing_class.rb, line 42 def all? true end
any?()
click to toggle source
# File lib/or_else/nothing_class.rb, line 46 def any? all? end
each()
click to toggle source
# File lib/or_else/nothing_class.rb, line 39 def each end
empty?()
click to toggle source
# File lib/or_else/nothing_class.rb, line 19 def empty? true end
exists?()
click to toggle source
# File lib/or_else/nothing_class.rb, line 27 def exists? !empty? end
filter()
click to toggle source
# File lib/or_else/nothing_class.rb, line 15 def filter Nothing end
flat_map()
click to toggle source
# File lib/or_else/nothing_class.rb, line 11 def flat_map Nothing end
map()
click to toggle source
# File lib/or_else/nothing_class.rb, line 7 def map Nothing end
nil?()
click to toggle source
# File lib/or_else/nothing_class.rb, line 23 def nil? empty? end
or_else() { || ... }
click to toggle source
# File lib/or_else/nothing_class.rb, line 35 def or_else yield end
present?()
click to toggle source
# File lib/or_else/nothing_class.rb, line 31 def present? exists? end