Ruby Flashcards

1
Q

Ruby is a dynamic language. What does it mean for a language to be dynamic?

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

How do pointers work with Dynamic languages?

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

How do you run a ruby file?

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

Ho do you use -e or irb?

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

How do you use semicolons and comments in Ruby?

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

How do you see the type of an object in Ruby?

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

What is the implemented toString( ) method equivalent in Ruby?

A

to_s

it is called automatically for printing basic variables:

PI = 3.14; puts PI

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

How do you find the length of a string?

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

How does x = 3+2 work internally in Ruby?

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

In general, how does if and else work in Ruby?

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

In gerneral, how do while loops work with Ruby?

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

In general, what are the options for for-loops in Ruby?

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

In general, how do methods work in Ruby?

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

In general, how do Arrays work in Ruby?

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

How does deep and shallow copies work in Ruby?

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

How do you change an existing class?

A
17
Q

What are the Ruby naming conventions for:

  1. Global variables
  2. Instance vars
  3. Constants
  4. Locals/parameters/method names
  5. Class names
  6. Symbols
A
18
Q

How do strings with double quotes work?

A
19
Q

How do string work with single quotes?

A
20
Q

In general, how do interators work in Ruby?

A