Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A
- def self.create(subclass, *args) # subclass must be either 'A1' or 'A2'
- return Object.const_get(subclass).send(:new, *args)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement