Class: Decoding::Err

Inherits:
Result show all
Defined in:
lib/decoding/result.rb

Overview

The Err value represents the result of an unsuccessful computation.

See Also:

Instance Attribute Summary

Attributes inherited from Result

#hash

Instance Method Summary collapse

Methods inherited from Result

all, #and, #and_then, #deconstruct, #eql?, err, #initialize, #inspect, #map, ok, #ok?, #to_result, #unwrap

Constructor Details

This class inherits a constructor from Decoding::Result

Instance Method Details

#err?Boolean

Returns:

  • (Boolean)


162
# File 'lib/decoding/result.rb', line 162

def err? = true

#map_errObject



163
# File 'lib/decoding/result.rb', line 163

def map_err = self.class.new(yield value)

#unwrap_err(_) ⇒ Object



164
# File 'lib/decoding/result.rb', line 164

def unwrap_err(_) = value