Skip to content

Instantly share code, notes, and snippets.

@dongri
Last active December 28, 2015 02:59
Show Gist options
  • Save dongri/7431765 to your computer and use it in GitHub Desktop.
Save dongri/7431765 to your computer and use it in GitHub Desktop.
def DongriServer
PRIORITY_HIGH = 1
PRIORITY_NORMAL = 2
PRIORITY_LOW = 3
me = Dongri.new
def request(user, job)
if job[:priority] == PRIORITY_HIGH
response(PRIORITY_HIGH)
elsif user.isExcellent? || user.isFriendly?
response(PRIORITY_HIGH)
elsif me.condition == "Good"
response(PRIORITY_NORMAL)
else
response(PRIORITY_LOW)
end
end
def response(priority)
....
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment