Skip to content

Instantly share code, notes, and snippets.

@brgnepal
Created June 25, 2014 07:30
Show Gist options
  • Save brgnepal/54130d090b1fd0278150 to your computer and use it in GitHub Desktop.
Save brgnepal/54130d090b1fd0278150 to your computer and use it in GitHub Desktop.
# ==================== Main Behavior ================================
RUBY_EXPERIENCE_POINT = 50
metaprogramming_classes.each_with_index do |klass, index|
klass_day = index + 1
author.publish_to_repo(klass.demo_code_snippets, klass_day)
students.each do |student|
code_snippets = student.refer_to_repo(klass, klass_day)
student.run_and_understand(code_snippets, which_day) # gain some experience
student.gain(RUBY_EXPERIENCE_POINT, which_day) if student.know_ruby? # Assuming Student gain 50 if he/she knows Ruby
student.revise(klass_day) if student.interested?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment