Guest User

Untitled

a guest
Oct 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. def def_scope(name, &block)
  2. singleton_class.send(:define_method, name) do |*args|
  3. klass = clone
  4. klass.instance_eval(block.curry[*args])
  5. klass
  6. end
  7. end
Add Comment
Please, Sign In to add comment