lib/muina/maybe/none.rb in muina-0.5.0 vs lib/muina/maybe/none.rb in muina-0.6.0
- old
+ new
@@ -2,11 +2,11 @@
module Muina
class Maybe
class None < self
private_class_method(:new)
- def initialize
+ def initialize # rubocop:disable Lint/MissingSuper
freeze
end
def some?
false
@@ -15,23 +15,21 @@
def none?
true
end
def value!
- raise
+ raise UnwrappingError
end
def value_or(default)
default
end
def value_or_yield
yield
end
- def value_or_nil
- nil
- end
+ def value_or_nil; end
def and_then
self
end