lib/muina/maybe/some.rb in muina-0.5.0 vs lib/muina/maybe/some.rb in muina-0.6.0
- old
+ new
@@ -1,15 +1,15 @@
# frozen_string_literal: true
module Muina
class Maybe
class Some < self
- def initialize(value)
+ private_class_method(:new)
+ def initialize(value) # rubocop:disable Lint/MissingSuper
@value = value
freeze
end
- private_class_method(:new)
def some?
true
end
@@ -19,11 +19,11 @@
def value!
@value
end
- def value_or(default)
+ def value_or(_default)
@value
end
def value_or_yield
@value
@@ -58,10 +58,10 @@
self
end
def ==(other)
self.class == other.class &&
- self.value! == other.value!
+ value! == other.value!
end
end
end
end