Advertisement
Guest User

Untitled

a guest
Jan 29th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.27 KB | None | 0 0
  1. class myobject
  2.       def initialize(obj, method)
  3.           @command = method
  4.           @obj = obj
  5.       end
  6.       def do_it
  7.           @obj.send(method)
  8.       end
  9. end
  10.  
  11. myo = myobject.new(self, "dofancystuff")
  12. myo.do_it
  13.  
  14. def dofancystuff
  15.     #! does something here
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement