Top Level Namespace
Defined Under Namespace
Modules: MtTool Classes: ObjCClass, ObjCClassTemplate, ObjCIvar, ObjCIvarGetterNameOption, ObjCIvarTemplate
Constant Summary collapse
- OBJC_TYPE_STRING =
constants
"NSString *"
- OBJC_TYPE_NUMBER =
"NSNumber *"
- OBJC_TYPE_NSDIC =
"NSDictionary *"
- OBJC_TYPE_ID =
"id"
- OBJC_TYPE_ARRAY =
"NSArray *"
- OBJC_TYPE_BOOL =
"BOOL"
- OBJC_TYPE_NULL =
"NSNull *"
- ATTRIBUTE_NONATOMIC =
attributes
"nonatomic"
- ATTRIBUTE_COPY =
"copy"
- OBJC_CLASSES =
{}
Instance Method Summary collapse
Instance Method Details
#attr_name_for_attr_array(attr_array) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/mt_tool/oc_model/main.rb', line 50 def attr_name_for_attr_array(attr_array) attr_name = "" attr_array.each_with_index do |attribute, index| if index != 0 attr_name << ", #{attribute}" else attr_name << "#{attribute}" end end return attr_name end |
#prop_for_key_value(key, value) ⇒ Object
65 66 67 68 69 70 71 72 |
# File 'lib/mt_tool/oc_model/main.rb', line 65 def prop_for_key_value(key, value) type = $type_map["#{value.class}"] attribute = attr_name_for_attr_array($attr_map[type]) var_name = key prop_ret = "#{$prop_declare} (#{attribute}) #{type}#{var_name};" return prop_ret end |