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
| def gravatar_url(email,options = {}) | |
| require 'digest/md5' | |
| hash = Digest::MD5.hexdigest(email) | |
| url = "http://www.gravatar.com/avatar/#{hash}" | |
| options.each do |option| | |
| option == options.first ? url+="?" : url+="&" | |
| key = option[0].to_s | |
| value = option[1].to_s | |
| url+=key + "=" + value | |
| end |
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
| class Player | |
| Directions = [:left, :right, :forward, :backward] | |
| FullHealth = 20 | |
| def full_health? | |
| @warrior.health == FullHealth | |
| end | |
| def whats_out_there? |
NewerOlder