Created
May 17, 2016 18:58
-
-
Save leoallen85/a80aafcaed9e4f9e833f732fc5b0d4f1 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