Skip to content

Conversation

@erisdev
Copy link
Contributor

@erisdev erisdev commented Feb 28, 2011

I've made use of Ruby's Forwardable module to shorten delegate methods to a single line each. Thus:

def add_game_object(object)
  @game_objects.add_game_object(object)
end

becomes

def_delegator :@game_objects, :add_game_object

Also extracted the duplicated FPS counter code from Window and Console into a new helper module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant