Ruby Terms Flashcards
1
Q
Checks the array for specific value and returns “true” or “false” if value is found.
A
.include?
2
Q
Add input (to the end) of an array.
A
.push
3
Q
deletes the last item in array
A
.pop
4
Q
takes array series and makes one
A
.flatten
5
Q
makes every value/word/string it’s own array item
A
.split
6
Q
runs a block once over each item
A
.each
7
Q
runs a block once over each item and changes the original
A
.map
8
Q
check to see if there’s an assigned key within a block
A
.has_key?
9
Q
return the key/value pair
A
.select
10
Q
shortcut to return only the value, passing on the key
A
.fetch
11
Q
converts a hash to an array
A
.to_a