for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
# frozen_string_literal: true
require_relative '../type'
require_relative '../mixin/errors'
module AMA
module Entity
class Mapper
class Type
# Used as a wildcard to pass anything through
class Any < Type
include Mixin::Errors
def initialize
super(self.class)
denormalizer_block { |entity, *| entity }
normalizer_block { |entity, *| entity }
validator_block { |*| [] }
end
INSTANCE = new
def parameters
{}
def attributes
def parameter!(*)
compliance_error('Tried to declare parameter on Any type')
def resolve_parameter(*)
self
def instance?(object, *)
!object.nil?
def hash
self.class.hash
def eql?(other)
other.is_a?(Type)
def ==(other)
eql?(other)
def to_s
'Any Type'
def to_def
'*'