Skip to content

Instantly share code, notes, and snippets.

@claudijd
Created August 13, 2014 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claudijd/ca73faab83c6d5b8c022 to your computer and use it in GitHub Desktop.
Save claudijd/ca73faab83c6d5b8c022 to your computer and use it in GitHub Desktop.
Neo's getting some new skills, yo
>> brain = Brain.new()
=> #<Brain:0x00000102802f98 @skills=["hide", "run"]>
>> brain.what_to_do?
=> "run"
>> require 'monkey_patched_brain'
=> true
>> brain.what_to_do?
=> "run"
>> brain.get_new_skills
=> ["round house kick", "karate chop"]
>> brain.what_to_do?
=> "round house kick"
>> brain.what_to_do?
=> "karate chop"
>> brain.to_s
=> "#<Brain:0x00000102802f98>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment