Created
February 12, 2012 12:10
-
-
Save dasch/1808214 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
class RockScore | |
def initialize(value) | |
@value = value | |
end | |
def available? | |
[email protected]? | |
end | |
def value | |
# Alternatively, have a NoScore that just raises | |
# when #value is called and keep this as a simple | |
# reader. | |
if @value.nil? | |
raise "WAT!" | |
else | |
@value | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment