lib/dry/monads.rb in dry-monads-1.2.0 vs lib/dry/monads.rb in dry-monads-1.3.0
- old
+ new
@@ -3,10 +3,11 @@
module Dry
# Common, idiomatic monads for Ruby
#
# @api public
module Monads
+ # @private
def self.included(base)
if all_loaded?
base.include(*constructors)
else
raise "Load all monads first with require 'dry/monads/all'"
@@ -45,10 +46,10 @@
def self.[](*monads)
monads.sort!
@mixins.fetch_or_store(monads.hash) do
monads.each { |m| load_monad(m) }
mixins = monads.map { |m| registry.fetch(m) }
- Module.new { include(*mixins) }.freeze
+ ::Module.new { include(*mixins) }.freeze
end
end
end
end