class AMA::Entity::Mapper::Type::Any

Used as a wildcard to pass anything through

Constants

INSTANCE

Public Class Methods

new() click to toggle source
Calls superclass method AMA::Entity::Mapper::Type::new
# File lib/ama-entity-mapper/type/any.rb, line 14
def initialize
  super(self.class)
  denormalizer_block { |entity, *| entity }
  normalizer_block { |entity, *| entity }
  validator_block { |*| [] }
end

Public Instance Methods

==(other) click to toggle source
# File lib/ama-entity-mapper/type/any.rb, line 51
def ==(other)
  eql?(other)
end
attributes() click to toggle source
# File lib/ama-entity-mapper/type/any.rb, line 27
def attributes
  {}
end
eql?(other) click to toggle source
# File lib/ama-entity-mapper/type/any.rb, line 47
def eql?(other)
  other.is_a?(Type)
end
hash() click to toggle source
# File lib/ama-entity-mapper/type/any.rb, line 43
def hash
  self.class.hash
end
instance?(object, *) click to toggle source
# File lib/ama-entity-mapper/type/any.rb, line 39
def instance?(object, *)
  !object.nil?
end
parameter!(*) click to toggle source
# File lib/ama-entity-mapper/type/any.rb, line 31
def parameter!(*)
  compliance_error('Tried to declare parameter on Any type')
end
parameters() click to toggle source
# File lib/ama-entity-mapper/type/any.rb, line 23
def parameters
  {}
end
resolve_parameter(*) click to toggle source
# File lib/ama-entity-mapper/type/any.rb, line 35
def resolve_parameter(*)
  self
end
to_def() click to toggle source
# File lib/ama-entity-mapper/type/any.rb, line 59
def to_def
  '*'
end
to_s() click to toggle source
# File lib/ama-entity-mapper/type/any.rb, line 55
def to_s
  'Any Type'
end