I'm repurposing this neglected blog to act as a record of my journey into game development.
class Array def hash_by(attribute) self.inject({}) do |hash, e| hash[e.send(attribute)] = e hash end endend
Post a Comment
No comments:
Post a Comment