Created
July 5, 2014 17:13
-
-
Save sebyx07/19acb256ce733ebc8a2f 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
roles = { | |
spectator: [:send_message], | |
memeber: [:send_message, :change_slot], | |
captain: [:send_message, :change_slot, :start_game] | |
} | |
def send_message(options={}) | |
message = options[:message] | |
party = options[:party] | |
role = self.current_role(party) | |
if checkIfValidAction(role, #???) | |
#..... | |
end | |
end | |
def checkIfValidAction(party, action) | |
#???????? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
roles.include?(options[:action])