Created
May 17, 2016 18:58
-
-
Save leoallen85/97352fc26694fcde661c1b8674b6e0bd 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 Proposition | |
def initialize(sentence) | |
@sentence = sentence | |
end | |
def false? | |
subject.false? | |
end | |
def subject | |
return self if @sentence.include?("This sentence") | |
p "I can't evaluate as I'm not clever enough" | |
end | |
end | |
prop = Proposition.new("This sentence is false") | |
p prop.false? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment