Method: Gitlab::Fp::Result#unwrap

Defined in:
lib/gitlab/fp/result.rb

#unwrapObject

“#unwrap” corresponds to “unwrap” in Rust.

Returns:

  • (Object)

Raises:

  • (RuntimeError)

    if called on an “err” Result



61
62
63
# File 'lib/gitlab/fp/result.rb', line 61

def unwrap
  ok? ? value : raise("Called Result#unwrap on an 'err' Result")
end