Skip to content

Instantly share code, notes, and snippets.

@rlmattax
Created November 23, 2010 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlmattax/712034 to your computer and use it in GitHub Desktop.
Save rlmattax/712034 to your computer and use it in GitHub Desktop.
Phillipians 2:1-4
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