From: Alexis Laferrière Date: Wed, 26 Aug 2015 14:09:46 +0000 (-0400) Subject: contrib/objcwrapper: intro `ObjcMethod::is_init` X-Git-Tag: v0.7.8~61^2~13 X-Git-Url: http://nitlanguage.org contrib/objcwrapper: intro `ObjcMethod::is_init` Signed-off-by: Alexis Laferrière --- diff --git a/contrib/objcwrapper/src/objc_model.nit b/contrib/objcwrapper/src/objc_model.nit index b2465c5..46589c9 100644 --- a/contrib/objcwrapper/src/objc_model.nit +++ b/contrib/objcwrapper/src/objc_model.nit @@ -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`