Module: Dry::Monads::SuperDiff Private

Defined in:
lib/dry/monads/extensions/super_diff.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Modules: Differs, ITBuilders, OT, OTBuilders, OTFlatteners Classes: Dict, Tuple

Constant Summary collapse

VALUES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

[
  Result::Success,
  Result::Failure,
  Maybe::Some,
  Maybe::None,
  Try::Value
].freeze
EXTRACT_VALUE_MAP =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  Result::Success => lambda(&:value!),
  Result::Failure => lambda(&:failure),
  Maybe::Some => lambda(&:value!),
  Maybe::None => lambda { |_| Unit },
  Try::Value => lambda(&:value!)
}.freeze
EXTRACT_VALUE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

lambda do |v|
  EXTRACT_VALUE_MAP[v.class].(v)
end
IS_ARRAY =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

lambda do |v|
  EXTRACT_VALUE.(v).is_a?(::Array)
end
IS_HASH =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

lambda do |v|
  EXTRACT_VALUE.(v).is_a?(::Hash)
end
TOKEN_MAP =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  Result::Success => "Success",
  Result::Failure => "Failure",
  Maybe::Some => "Some",
  Maybe::None => "None",
  Try::Value => "Value"
}.freeze