-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdata.rb
More file actions
65 lines (32 loc) · 1.12 KB
/
data.rb
File metadata and controls
65 lines (32 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Loading seed data
puts "\nLoading data for the previous TSL students.. "
load 'seeds.rb'
STUDENTS.each do |name|
puts "#{name}"
end
# CHALLENGE 1
# Using the each method and the STUDENTS array. Find Vince
# and return the following output:
# name: Vince Cabansag
# twitter: @vcabansag
# github: vcabansag
# blog: http://vincentcabansag.com
# email: vince@starterleague.com
# CHALLENGE 2
# Gather all of the Twitter handles into an array and show them on separate lines
# CHALLENGE 3
# Update your script so that you only show values of a person if they're present
# We don't want to see "blog: " or "github: "
# CHALLENGE 4
# Refactor your code to use the .keys method to access the key value pairs
# We don't need to explicity type every key. Play around with the .keys method.
# BONUS CHALLENGE 5
# Create a method to display the details of a student
# Create a method to find a student by first name
# Take into account that the data set may continue people with the same names
# Remember, methods can look like this
# def show_student_details
# end
# or this
# def show_student_details(student)
# end