Roshan Book

My Tech Notebook

Ruby lesson 1 basic

1. anything starting with ‘#’ is a comment
2. Classes names are in CamelCase while variable and functions are used_with_underscore
3. ALL_Uppercase for constants
4. Parenthesis () are for convenience and not a general rule. DO away with it whenever arguments are less, for conditional statements (if-else) and empty functions
5. puts is for print
6. You can insert multiple ruby statements in one line separated by ‘;’. Although try to follow one stement per line

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: