Guest User

Untitled

a guest
Jun 18th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. class Field
  2. @sides = [:n,:s,:w,:e,:ne,:nw,:se,:sw]
  3. def initialize
  4. @edges = {}
  5. end
  6. @sides.each do |sym|
  7. define_method sym { |num| @edges[sym] = num }
  8. end
  9. end
Add Comment
Please, Sign In to add comment