class Dry::Types::AnyClass
Any is a nominal type that defines Object
as the primitive class
This type is useful in places where you can't be specific about the type and anything is acceptable.
@api public
Public Class Methods
name()
click to toggle source
# File lib/dry/types/any.rb, line 12 def self.name "Any" end
new(**options)
click to toggle source
@api private
Calls superclass method
# File lib/dry/types/any.rb, line 17 def initialize(**options) super(::Object, **options) end
Public Instance Methods
name()
click to toggle source
@return [String]
@api public
# File lib/dry/types/any.rb, line 24 def name "Any" end
to_ast(meta: true)
click to toggle source
@return [Array]
@api public
# File lib/dry/types/any.rb, line 40 def to_ast(meta: true) [:any, meta ? self.meta : EMPTY_HASH] end
with(**new_options)
click to toggle source
@param [Hash] new_options
@return [Type]
@api public
# File lib/dry/types/any.rb, line 33 def with(**new_options) self.class.new(**options, meta: @meta, **new_options) end