Created
May 17, 2016 18:56
-
-
Save leoallen85/b03d5df91b362fd8fdb19c0234125592 to your computer and use it in GitHub Desktop.
This file contains 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