contrib/objcwrapper: intro `ObjcMethod::is_init`
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 26 Aug 2015 14:09:46 +0000 (10:09 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 27 Aug 2015 18:34:45 +0000 (14:34 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/objcwrapper/src/objc_model.nit

index b2465c5..46589c9 100644 (file)
@@ -48,6 +48,9 @@ class ObjcMethod
 
        # Return type as a `String`
        var return_type: String is noinit, writable
+
+       # Does this method look like a constructor/method?
+       fun is_init: Bool do return params.first.name.has_prefix("init")
 end
 
 # Attribute of an `ObjcClass`