📝 Import Dry.Types, not Dry::Types

This commit is contained in:
Jan Dudulski 2021-07-10 03:05:24 +02:00
parent 36aed854bf
commit a47c4b5149
No known key found for this signature in database
GPG Key ID: F2EC94C82E81A03F
3 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@ require "dry/types"
Dry::Types.load_extensions(:maybe)
module Types
include Dry::Types()
include Dry.Types()
end
begin

View File

@ -180,7 +180,7 @@ module Dry
#
# module Types
# # imports all types as constants, uses modules for namespaces
# include Dry::Types()
# include Dry.Types()
# end
# # strict types are exported by default
# Types::Integer
@ -191,7 +191,7 @@ module Dry
# @example changing default types
#
# module Types
# include Dry::Types(default: :nominal)
# include Dry.Types(default: :nominal)
# end
# Types::Integer
# # => #<Dry::Types[Nominal<Integer>]>
@ -199,7 +199,7 @@ module Dry
# @example cherry-picking namespaces
#
# module Types
# include Dry::Types(:strict, :coercible)
# include Dry.Types(:strict, :coercible)
# end
# # cherry-picking discards default types,
# # provide the :default option along with the list of
@ -208,7 +208,7 @@ module Dry
#
# @example custom names
# module Types
# include Dry::Types(coercible: :Kernel)
# include Dry.Types(coercible: :Kernel)
# end
# Types::Kernel::Integer
# # => #<Dry::Types[Constructor<Nominal<Integer> fn=Kernel.Integer>]>

View File

@ -8,7 +8,7 @@ module Dry
# Export types registered in a container as module constants.
# @example
# module Types
# include Dry::Types(:strict, :coercible, :nominal, default: :strict)
# include Dry.Types(:strict, :coercible, :nominal, default: :strict)
# end
#
# Types.constants