class Immutabler::TypeMapper

Constants

TYPE_MAPPING

Public Class Methods

map(type, options) click to toggle source
# File lib/immutabler/type_mapper.rb, line 40
def self.map(type, options)
  default_mapping(type).merge(TYPE_MAPPING.fetch(type, default_mapping(type))).merge(options)
end

Private Class Methods

default_mapping(type) click to toggle source
# File lib/immutabler/type_mapper.rb, line 46
def self.default_mapping(type)
  {
    type: type,
    is_ref: true,
    ref_type: 'strong',
    is_id: false
  }
end