class Yet::Valid
Public Instance Methods
invalid?()
click to toggle source
# File lib/yet/valid.rb, line 16 def invalid?; false end
map(&fn)
click to toggle source
# File lib/yet/valid.rb, line 5 def map(&fn) new_value = fn.call(@value) return new_value if new_value.is_a?(Invalid) Yet.valid(new_value) end
then(&fn)
click to toggle source
# File lib/yet/valid.rb, line 13 def then(&fn) Yet.valid(@value, [*@operations, fn]) end
valid?()
click to toggle source
# File lib/yet/valid.rb, line 15 def valid?; true end