Name non-overridden / non-iOS framework methods in a more Ruby-like style #5

timbogit opened this Issue May 10, 2012 · 4 comments

4 participants


I feel like it would make it easier to read / more consistent with accepted Ruby coding practices if the methods were named by separating words with underscores (i.e., 'my_awesome_method' as opposed to 'myAwesomeMethod').
I therefore suggest
a) changing the examples to follow a standard where only the overridden iOS framework method be named in camel-case
b) maybe reworking RubyMotion to even allow using the underscore notation for overridden methods (e.g., UIViewController#load_view instead of UIViewController#loadView)


here is a commit that explains more of what I mean:


👍 Matt Aimonetti's MacRuby book recommends this practice too: sticking with camel case for Objective-C methods, and using snake_case for any custom methods. This gives the added bonus of being able to easily recognize if the method being called is your own or not.


+1 for a)

Some of the sample code uses underscored methods already, e.g. beer_details_controller

-1 for b) though, I like the visual distinction.

HipByte member

As described here we’re not going to enforce any style rules and so I think it}s ok if the samples reflect this.

In fact, having different styles in the repo might make it easier for people to determine what they like.

@alloy alloy closed this Nov 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment