class Dry::Types::AnyClass
@api public
and anything is acceptable.
This type is useful in places where you can’t be specific about the type
Any is a nominal type that defines Object as the primitive class
def self.name = "Any"
def self.name = "Any"
def initialize(**options)
- Api: - private
def initialize(**options) super(::Object, **options) end
def name = "Any"
- Api: - public
Returns:
-
(String)
-
def name = "Any"
def to_ast(meta: true) = [:any, meta ? self.meta : EMPTY_HASH]
- Api: - public
Returns:
-
(Array)
-
def to_ast(meta: true) = [:any, meta ? self.meta : EMPTY_HASH]
def with(**new_options)
- Api: - public
Returns:
-
(Type)
-
Parameters:
-
new_options
(Hash
) --
def with(**new_options) self.class.new(**options, meta: @meta, **new_options) end