Class: Immutabler::TypeMapper
- Inherits:
-
Object
- Object
- Immutabler::TypeMapper
- Defined in:
- lib/immutabler/type_mapper.rb
Constant Summary collapse
- TYPE_MAPPING =
{ 'int' => { type: 'NSInteger', is_ref: false }, 'float' => { type: 'CGFloat', is_ref: false }, 'double' => { type: 'double', is_ref: false }, 'bool' => { type: 'BOOL', is_ref: false }, 'array' => { type: 'NSArray', is_ref: true }, 'string' => { type: 'NSString', is_ref: true }, 'dict' => { type: 'NSDictionary', is_ref: true }, 'id' => { type: 'id', is_ref: true, ref_type: 'strong', is_id: true } }
Class Method Summary collapse
Class Method Details
.map(type, options) ⇒ Object
40 41 42 |
# File 'lib/immutabler/type_mapper.rb', line 40 def self.map(type, ) default_mapping(type).merge(TYPE_MAPPING.fetch(type, default_mapping(type))).merge() end |