Class: ActiveRecord::Type::HashLookupTypeMap

Inherits:
TypeMap show all
Defined in:
activerecord/lib/active_record/type/hash_lookup_type_map.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from TypeMap

#clear, #fetch, #initialize, #lookup, #register_type

Constructor Details

This class inherits a constructor from ActiveRecord::Type::TypeMap

Instance Method Details

#alias_type(type, alias_type) ⇒ Object


4
5
6
# File 'activerecord/lib/active_record/type/hash_lookup_type_map.rb', line 4

def alias_type(type, alias_type)
  register_type(type) { |_, *args| lookup(alias_type, *args) }
end

#key?(key) ⇒ Boolean

Returns:


8
9
10
# File 'activerecord/lib/active_record/type/hash_lookup_type_map.rb', line 8

def key?(key)
  @mapping.key?(key)
end

#keysObject


12
13
14
# File 'activerecord/lib/active_record/type/hash_lookup_type_map.rb', line 12

def keys
  @mapping.keys
end