Class: ActiveRecord::Type::HashLookupTypeMap
- 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
6 7 8 |
# File 'activerecord/lib/active_record/type/hash_lookup_type_map.rb', line 6 def alias_type(type, alias_type) register_type(type) { |_, *args| lookup(alias_type, *args) } end |
#key?(key) ⇒ Boolean
10 11 12 |
# File 'activerecord/lib/active_record/type/hash_lookup_type_map.rb', line 10 def key?(key) @mapping.key?(key) end |
#keys ⇒ Object
14 15 16 |
# File 'activerecord/lib/active_record/type/hash_lookup_type_map.rb', line 14 def keys @mapping.keys end |