Formatting Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

When defining or initializing a method, variable, or file, what case should it be in

A

snake_case

def this_is_a_great_method
  # do stuff
end
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In Ruby, constants are denoted with what format?

A

all uppercase letters

FOUR = ‘four’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When naming classes, what case format should be used?

A

CamelCase

# Class naming
  class MyFirstClass
  en
How well did you know this?
1
Not at all
2
3
4
5
Perfectly