Advertisement
Guest User

Untitled

a guest
May 30th, 2017
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.13 KB | None | 0 0
  1. class Module
  2.     def attr_ (*syms)
  3.         syms.each do |sym|
  4.             class_eval %{def #{sym}= (val)
  5.                 @#{sym} end} = val
  6.         end
  7.     end
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement