module Dry::Monads::Try::Value::Error::Mixin

A module that can be included for easier access to Try monads.

@example

class Foo
  include Dry::Monads::Try::Mixin

  attr_reader :average

  def initialize(total, count)
    @average = Try(ZeroDivisionError) { total / count }.value
  end
end

Foo.new(10, 2).average # => 5
Foo.new(10, 0).average # => nil