Sha256: e72c7769ca69c6179cdf5ed2b474a8f124ac075c801a36c4b77200bbc7bb4040
Contents?: true
Size: 628 Bytes
Versions: 11
Compression:
Stored size: 628 Bytes
Contents
module Fear class Some include Option include Dry::Equalizer(:get) include RightBiased::Right attr_reader :value protected :value def initialize(value) @value = value end # @return [any] def get @value end # @return [any] def or_nil @value end # @return [false] def empty? false end # @return [Option] def select if yield(value) self else None.new end end # @return [Option] def reject if yield(value) None.new else self end end end end
Version data entries
11 entries across 11 versions & 1 rubygems