Search in sources :

Example 1 with RNamedArgument

use of org.jetbrains.plugins.ruby.ruby.lang.psi.controlStructures.methods.RNamedArgument in project intellij-plugins by JetBrains.

the class RubyMotionTypeProvider method calculateObjCName.

private static String calculateObjCName(final String methodName, final List<RArgument> arguments) {
    final StringBuilder objCNameBuilder = new StringBuilder(methodName).append(":");
    for (RArgument argument : arguments) {
        if (argument instanceof RNamedArgument) {
            final RPsiElement nameIdentifier = ((RNamedArgument) argument).getNameIdentifier();
            assert nameIdentifier != null;
            objCNameBuilder.append(nameIdentifier.getName()).append(":");
        }
    }
    return objCNameBuilder.toString();
}
Also used : RNamedArgument(org.jetbrains.plugins.ruby.ruby.lang.psi.controlStructures.methods.RNamedArgument) RPsiElement(org.jetbrains.plugins.ruby.ruby.lang.psi.RPsiElement) RArgument(org.jetbrains.plugins.ruby.ruby.lang.psi.controlStructures.methods.RArgument)

Aggregations

RPsiElement (org.jetbrains.plugins.ruby.ruby.lang.psi.RPsiElement)1 RArgument (org.jetbrains.plugins.ruby.ruby.lang.psi.controlStructures.methods.RArgument)1 RNamedArgument (org.jetbrains.plugins.ruby.ruby.lang.psi.controlStructures.methods.RNamedArgument)1