Created
March 29, 2016 16:54
-
-
Save mindplace/20c59c90cd03075efe99dd49ef9d295c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
skippers = GlobalCohort.new("Fiery Skippers", Date.parse("8-February-2016")) | |
# => #<GlobalCohort:0x007f956c09bc40 @local_cohorts=[], @students=[], @name="Fiery Skippers", @p0_start_date=#<Date: 2016-03-08 ((2457456j,0s,0n),+0s,2299161j)>> | |
nyc = LocalCohort.new("New York", skippers) | |
chicago = LocalCohort.new("Chicago", skippers) | |
sanfran = LocalCohort.new("San Francisco", skippers) | |
skippers.add_local_cohort(nyc) | |
skippers.add_local_cohort(chicago) | |
skippers.add_local_cohort(sanfran) | |
skippers.local_cohorts | |
# => [#<LocalCohort:0x007f956c09b970 @global_cohort=#<GlobalCohort:0x007f956c09bc40 @local_cohorts=[...], @students=[], @name="Fiery Skippers", @p0_start_date=#<Date: 2016-03-08 ((2457456j,0s,0n),+0s,2299161j)>>, @city="New York", @students=[]>, | |
#<LocalCohort:0x007f956c09b8f8 @global_cohort=#<GlobalCohort:0x007f956c09bc40 @local_cohorts=[...], @students=[], @name="Fiery Skippers", @p0_start_date=#<Date: 2016-03-08 ((2457456j,0s,0n),+0s,2299161j)>>, @city="Chicago", @students=[]>, #<LocalCohort:0x007f956c09b858 @global_cohort=#<GlobalCohort:0x007f956c09bc40 @local_cohorts=[...], @students=[], @name="Fiery Skippers", @p0_start_date=#<Date: 2016-03-08 ((2457456j,0s,0n),+0s,2299161j)>>, @city="San Francisco", @students=[]>] | |
nyc.global_cohort_name | |
# => "Fiery Skippers" | |
esther_leytush = Student.new("Esther Leytush", "[email protected]", nyc) | |
nyc.add_student(esther_leytush) | |
esther_leytush.local_cohort_name | |
# => "New York" | |
esther_leytush.global_cohort_name | |
# => "Fiery Skippers" | |
skippers.immersive_start_date | |
# => "11-Apr-2016" | |
esther_leytush.currently_in_phase | |
# => "p0" | |
skippers.phases_schedule | |
# Phase 0: 2016-02-08 to 2016-04-10 | |
# Phase 1: 2016-04-11 to 2016-04-24 | |
# Phase 2: 2016-04-25 to 2016-05-08 | |
# Phase 3: 2016-05-09 to 2016-05-29 | |
# Phase 4: 2016-05-30 to 2016-06-03 | |
# Graduation: 2016-06-04 | |
skippers.graduated? | |
# => false | |
shaun_sweet = Student.new("Shaun Sweet", "[email protected]", chicago) | |
chicago.add_student(shaun_sweet) | |
skippers.student_names_list | |
# ["Esther Leytush", "Shaun Sweet"] | |
esther_leytush.grade | |
# "No grades yet" | |
[["quiz 1", 80], ["quiz 2", 95], ["solo challenge 1", 97]].each do |item| | |
esther_leytush.add_history(item) | |
end | |
esther_leytush.grade | |
# => 90 | |
[["reflection", 96], ["quiz 2", 97], ["quiz 3", 95]].each do |item| | |
shaun_sweet.add_history(item) | |
end | |
shaun_sweet.grade | |
# => 96 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment