Created
November 23, 2010 16:30
-
-
Save rlmattax/712034 to your computer and use it in GitHub Desktop.
Phillipians 2:1-4
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
def main | |
require 'church' | |
require 'christian' | |
# Phillipians 2:1-4 | |
var church_body = new Church() # initialized w/ global dataset | |
var me = new Christian() | |
if ( | |
encouragement_in_christ or | |
consolation_of_love or | |
fellowship_of_the_spirit or | |
( affection and compassion ) | |
) | |
me.make_joy_complete(church) | |
end | |
end | |
def make_joy_complete(church) | |
self.mind = church.mind | |
self.love = church.love | |
self.spirit = church.spirit | |
self.purpose = church.purpose | |
do | |
self.live(church) ? "Yay!" : "Whoops!" | |
while !self.dead? | |
end | |
def live(church) | |
if me.selfish? or me.conceited? | |
# do nothing! | |
return false | |
else | |
# self must be <= others | |
church.each do |other| | |
if self > other | |
return false | |
end | |
end | |
# interest intersection must be non-zero | |
if (self.interests & church.interests).size == 0 | |
return false | |
end | |
end | |
return true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment