Ruby Ruby Loops Ruby Loops The While Loop

Chelsea Casareale
Chelsea Casareale
18,545 Points

CamelCase?

So I've been through a couple of Ruby courses now, and, coming from a JS background, I'm curious about the fact that there's no camelCase being used for variable and method names. Is that just not the thing to do when writing Ruby?

3 Answers

Yes you are right, by convention ruby variables and methods are written with downcase letters (exp: some_method).

You can get more info here about naming conventions in ruby. https://github.com/bbatsov/ruby-style-guide

rowend rowend
rowend rowend
2,923 Points

It is called snake_case

Chelsea Casareale
Chelsea Casareale
18,545 Points

That's kind of a bummer - I hate reaching to type the '_' lol. Oh well!

That link is great, thanks!