Skip to content

Instantly share code, notes, and snippets.

@Papierkorb
Last active January 19, 2018 23:35
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 Papierkorb/b1823506941d836eb335a27966671133 to your computer and use it in GitHub Desktop.
Save Papierkorb/b1823506941d836eb335a27966671133 to your computer and use it in GitHub Desktop.
class Boleite::InputReceiver
def process(event : InputEvent)
execute_all(@actions, event) unless event.claimed?
execute_all(@persistent_actions, event)
end
private def execute_all(actions, event)
actions.each{|act| act.execute(event) if act.interested?(event)}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment