w1d5 revisions Flashcards

1
Q

What is the syntax for creating a new Proc object?

A

Proc.new {|args| code}

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

What is the convention for naming private or protected methods?

A

Add an underscore to the beginning of the name:

def children

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